ODBC : problem with bookmark /precision - Mailing list pgsql-odbc

From Andre THEVENIN
Subject ODBC : problem with bookmark /precision
Date
Msg-id 432944B4.6010007@hortus.fr
Whole thread Raw
In response to ODBC : problem with bookmark  (Andre THEVENIN <andre.thevenin@hortus.fr>)
List pgsql-odbc

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)








pgsql-odbc by date:

Previous
From: "Dave Page"
Date:
Subject: Re: row count with libpq driver
Next
From: "Dave Page"
Date:
Subject: Re: ODBC Driver on Windows 64 bit