Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 98BCF9FA1A1 for ; Tue, 12 Dec 2006 16:26:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 65322-08 for ; Tue, 12 Dec 2006 16:26:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 9AFAF9F9FDA for ; Tue, 12 Dec 2006 16:26:02 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 6FEC730E05; Tue, 12 Dec 2006 21:26:01 +0100 (MET) From: "lothar.behrens@lollisoft.de" X-Newsgroups: pgsql.interfaces.odbc Subject: Re: SQLSetPos problem ? Date: 12 Dec 2006 12:25:53 -0800 Organization: http://groups.google.com Lines: 78 Message-ID: <1165955153.386694.185060@f1g2000cwa.googlegroups.com> References: <1165751917.708138.93120@j72g2000cwa.googlegroups.com> <457CACE1.2090907@tpf.co.jp> <1165848049.639913.7360@n67g2000cwd.googlegroups.com> <457DF1D9.7080804@tpf.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Complaints-To: groups-abuse@google.com In-Reply-To: <457DF1D9.7080804@tpf.co.jp> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/312.8.1 (KHTML, like Gecko) Safari/312.6,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: f1g2000cwa.googlegroups.com; posting-host=84.161.4.195; posting-account=ZEv0oQwAAAARGOrW-5pO2M_10hQ_J_Pj To: pgsql-odbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/49 X-Sequence-Number: 8496 Hiroshi Inoue schrieb: > lothar.behrens@lollisoft.de wrote: > > Hiroshi Inoue schrieb: > > > >> lothar.behrens@lollisoft.de wrote: > >>> Hi, > >>> > >>> I am using unixodbc in the latest version and psqlodbc 07.03.0200. > >>> Having many queries working > >>> good in my application one gives me this error, when updating a row. > >> The version 7.3.0200 is pretty old. > >> Please try the 8.2.xxxx version. > >> > > > > I need cursor functionality like first,back,next,last. Does the latest > > driver support it ? > > Yes at least on Windows. Currently I have figured out, that my SQL_ADD statement fails (SQLSetPos). It seems, that I cannot insert new rows, because of foreign key constraints. Removing the NOT NULL clauses of that columns didn't helped. With PGAdmin I was able to test inserting such a row. That worked. Any ideas ? If the bound columns having the wrong value - such as a non exsisting foreign key - how must it be filled to indicate a NULL value ? I bind such a column that way: buffer =3D malloc((ColumnSize+1)*rows); memset(buffer, 0, (ColumnSize+1)*rows); ret =3D SQLBindCol(hstmt, column, SQL_C_CHAR, buffer, (ColumnSize+1), &cbBufferLength); Is that wrong ? Regardless, I will also try the newest psqlODBC driver and also create a sample console app to insert into the same table. The GUI application is too complex. Lothar The logfile reports this error: [SQLError]**** PGAPI_Error: henv=3D0, hdbc=3D0 hstmt=3D170046048 **** PGAPI_StmtError: hstmt=3D170046048 <512> SC_get_error: status =3D 7, msg =3D #Error while executing the query; FEHLER: Einf=FCgen oder Aktualisieren in Tabelle =BBuser_anwendungen=AB verletzt Fremdschl=FCssel-Constraint =BBcst_user_anwendungen_userid=AB# szSqlState =3D 'HY000',len=3D170, szError=3D'Error while executing the query; FEHLER: Einf=FCgen oder Aktualisieren in Tabelle =BBuser_anwendungen=AB verletzt Fremdschl=FCssel-Constraint =BBcst_user_anwendungen_userid=AB' **** PGAPI_Error exit code=3D0 [SQLError]**** PGAPI_Error: henv=3D0, hdbc=3D0 hstmt=3D170046048 **** PGAPI_StmtError: hstmt=3D170046048 <512> SC_Get_error returned nothing. Thanks, Lothar > > regards, > Hiroshi Inoue > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings