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


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.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: <43283965.8020800@hortus.fr>
Permalink:  ../43283965.8020800@hortus.fr/
Also on:    postgresql.org/message-id/43283965.8020800@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
  In-Reply-To: <43283965.8020800@hortus.fr>
  References: <E7F85A1B5FF8D44C8A1AF6885BC9A0E4CC2C05@ratbert.vale-housing.co.uk> <43283965.8020800@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