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 202A8DB7EB for ; Tue, 15 Nov 2005 04:47:43 -0400 (AST) 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 94335-03 for ; Tue, 15 Nov 2005 08:47:43 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from geosys.fr (mail.geosys.fr [195.115.79.21]) by svr1.postgresql.org (Postfix) with ESMTP id 97CF7DB7CD for ; Tue, 15 Nov 2005 04:47:39 -0400 (AST) Received: from [192.168.1.60] tc@geosys.fr [192.168.1.60] by geosys.fr with NetMail SMTP Agent $Revision: 3.16 $ on Microsoft Windows; Tue, 15 Nov 2005 09:51:13 +0100 Message-ID: <4379A0A9.1070001@geosys.com> Date: Tue, 15 Nov 2005 09:47:37 +0100 From: Thomas Chabaud Reply-To: tc@geosys.com Organization: Geosys User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: fr, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: : Strange things with VB6 in adUseServer mode References: <4378B3B3.2010604@geosys.com> In-Reply-To: <4378B3B3.2010604@geosys.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/159 X-Sequence-Number: 6395 Thomas Chabaud a écrit : > Hello. > > I'm using PostgreSQL ODBC Driver v08.01.0100 with Visual Basic 6 > applications. > When I try an AddNew on a recordset with the following code : > > Dim rs As ADODB.Recordset > Set rs = New ADODB.Recordset > rs.Open "tRepertoiresParcellaires", dbConn,adOpenKeyset, _ > adLockPessimistic, adCmdTableDirect > > rs.AddNew > rs("myfield").value = "myvalue" > > I have always the same error : > "-2147467259 Error while executing the query; > ERROR: null value in column "mycolumn" violates not-null constraint" > > [...] I solve the problem by using adCmdTable, it seems to work in this mode. Thomas