X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EEFE8D6F3C for ; Thu, 15 Sep 2005 06:56:19 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76273-02 for ; Thu, 15 Sep 2005 09:56:15 +0000 (GMT) Received: from smtp12.wanadoo.fr (smtp12.wanadoo.fr [193.252.22.20]) by svr1.postgresql.org (Postfix) with ESMTP id 64734D8E2B for ; Thu, 15 Sep 2005 06:56:15 -0300 (ADT) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1212.wanadoo.fr (SMTP Server) with ESMTP id 1C0201C000BF for ; Thu, 15 Sep 2005 11:56:17 +0200 (CEST) Received: from hortus.fr (AMontpellier-206-1-4-128.w80-11.abo.wanadoo.fr [80.11.107.128]) by mwinf1212.wanadoo.fr (SMTP Server) with ESMTP id A95951C0004C; Thu, 15 Sep 2005 11:56:16 +0200 (CEST) X-ME-UUID: 20050915095616693.A95951C0004C@mwinf1212.wanadoo.fr Message-ID: <432944B4.6010007@hortus.fr> Date: Thu, 15 Sep 2005 11:53:56 +0200 From: Andre THEVENIN Reply-To: PostgreSQL-ODBC User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: fr-fr, fr MIME-Version: 1.0 To: PostgreSQL-ODBC Subject: ODBC : problem with bookmark /precision References: <43283965.8020800@hortus.fr> In-Reply-To: <43283965.8020800@hortus.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 required=5 tests=[FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200509/137 X-Sequence-Number: 6035 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 04 99 61 47 80 06 19 01 48 20 J'ai mis toute ma vie à savoir dessiner comme un enfant. (Pablo Picasso)