pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andre THEVENIN <andre.thevenin@hortus.fr>
To: PostgreSQL-ODBC <pgsql-odbc@postgresql.org>
Subject: ODBC : problem with bookmark /precision
Date: Thu, 15 Sep 2005 11:53:56 +0200
Message-ID: <432944B4.6010007@hortus.fr> (raw)
In-Reply-To: <43283965.8020800@hortus.fr>
References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4CC2C05@ratbert.vale-housing.co.uk>
	<43283965.8020800@hortus.fr>



Andre THEVENIN a écrit:

>
> Hi,
>
> I just begin to use PostGRE with ODBC on Win2000/VC++6
>
> I arrive to this kind of things
>
> void CODBCDlg::OnOpen()
> {
>    CString sql;
>    CComptes cpt(&m_fBase);
>    m_fBase.Open("ODBC;DSN=KEOPS");
>
>    sql.Format("SELECT * FROM [Comptes] WHERE [Type]=1",
>        cpt.GetDefaultSQL());
>
>    cpt.Open(cpt.snapshot,sql,CRecordset::useBookmarks);
>    cpt.AddNew();
>    cpt.m_Type=4;
>    cpt.m_Etat=2;
>    cpt.m_Nom="DD";
>    cpt.m_Date_ouverture=COleDateTime::GetCurrentTime();
>    cpt.Update();
>    CDBVariant mark;
>    cpt.GetBookmark(mark);
>
>    cpt.Close();
>    m_fBase.Close();
> }
>
> The Update works, but i have an error on GetBookmark
> Error 24000 : Invalid cursor state
>
> What can I do ?
>
The problem appears when my table contains a field of type "serial".

Has anyone an answer ?

-- 
André THEVENIN
Hortus Technologies
<andre.thevenin@hortus.fr>
04 99 61 47 80
06 19 01 48 20

J'ai mis toute ma vie à savoir dessiner comme un enfant.

(Pablo Picasso)










Message-ID: <432944B4.6010007@hortus.fr>
Permalink:  ../432944B4.6010007@hortus.fr/
Also on:    postgresql.org/message-id/432944B4.6010007@hortus.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: andre.thevenin@hortus.fr
  Subject: Re: ODBC : problem with bookmark /precision
  In-Reply-To: <432944B4.6010007@hortus.fr>
  References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4CC2C05@ratbert.vale-housing.co.uk> <43283965.8020800@hortus.fr> <432944B4.6010007@hortus.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox