Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 68A7E9FA3A3 for ; Wed, 1 Aug 2007 06:56:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 00389-03 for ; Wed, 1 Aug 2007 06:56:15 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 570F89F9F66 for ; Wed, 1 Aug 2007 06:56:15 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 116B231419; Wed, 1 Aug 2007 11:56:14 +0200 (MET DST) From: "Dmitry Samokhin" X-Newsgroups: pgsql.interfaces.odbc Subject: Unable to update JOIN'ed recordset with PSQLODBC 08.02.0400 and ADO Date: Wed, 1 Aug 2007 13:56:18 +0400 Organization: MNPP Saturn Lines: 78 Message-ID: Reply-To: "Dmitry Samokhin" X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original To: pgsql-odbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200708/1 X-Sequence-Number: 9118 In the following environment: WinXP SP2 + ADO + MS OLE DB Provider for ODBC drivers + PSQLODBC ANSI 08.02.0400 I'm unable to update a recordset of JOIN'ed tables. The method 'rs("colname") = ' started to fail with 08.02.0400, but it works fine with 08.02.0200. Something wrong with tables and columns metadata ADO gets from the driver, I suppose. My test suite included. Please note only columns from table t1 are loaded into the recordset, JOIN is used just for sorting rows. Test suite: Server side: ------------ CREATE TABLE t1 ( a integer NOT NULL, b integer, x character varying(255), CONSTRAINT pk_t1 PRIMARY KEY (a) ) WITHOUT OIDS; CREATE TABLE t2 ( b integer NOT NULL, c integer, CONSTRAINT pk_t2 PRIMARY KEY (b) ) WITHOUT OIDS; INSERT INTO t1 (a, b, x) VALUES (1, 100, 'String 1'); INSERT INTO t1 (a, b, x) VALUES (2, 200, 'String 2'); INSERT INTO t2 (b, c) VALUES (100, 1000); INSERT INTO t2 (b, c) VALUES (200, 2000); Client code: ------------ Sub Test() Dim strSql As String Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset cn.Open _ "Provider=MSDASQL;" & _ "DRIVER=PostgreSQL ANSI;" & _ "SERVER=127.0.0.1;" & _ "DATABASE=test;" & _ "UID=postgres;" & _ "PWD=postgres;" & _ "UseServerSidePrepare=1;" strSql = "SELECT t1.* FROM t1 INNER JOIN t2 ON t1.b = t2.b ORDER BY t2.c" rs.ActiveConnection = cn rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.Source = strSql rs.Open MsgBox rs("x") rs("x") = "Modified string" rs.Update MsgBox rs("x") rs.Close End Sub Regards, Dmitry