ODBC : problem with bookmark

From: Andre THEVENIN <andre(dot)thevenin(at)hortus(dot)fr>
To:
Cc: PostgreSQL-ODBC <pgsql-odbc(at)postgresql(dot)org>
Subject: ODBC : problem with bookmark
Date: 2005-09-14 14:53:25
Message-ID: 43283965.8020800@hortus.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


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 ?

--
André THEVENIN
Hortus Technologies
<andre(dot)thevenin(at)hortus(dot)fr>
04 99 61 47 80
06 19 01 48 20

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

(Pablo Picasso)

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Hajo Kirchhoff 2005-09-14 15:35:17 Re: ODBC Driver on Windows 64 bit
Previous Message Dave Page 2005-09-14 14:17:22 Re: ODBC Driver on Windows 64 bit