X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 39D8B5E46CA for ; Fri, 13 Aug 2004 20:31:23 -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 18775-10 for ; Fri, 13 Aug 2004 23:31:14 +0000 (GMT) Received: from ecintweb.eldocomp.com (smtp.eldocomp.com [205.159.99.8]) by svr1.postgresql.org (Postfix) with ESMTP id 6A9FB5E46C8 for ; Fri, 13 Aug 2004 20:31:11 -0300 (ADT) Received: by ecintweb.eldocomp.com with XWall v3.29f ; Fri, 13 Aug 2004 16:31:14 -0700 From: Andrew Ayers To: =?iso-8859-1?Q?Wolfgang=20F=FCrtbauer?= Cc: "pgsql-odbc@postgresql.org" Subject: Re: Problem with VB6, DAO, Data Control: Update does not work Date: Fri, 13 Aug 2004 16:31:13 -0700 X-Assembled-By: XWall v3.29f Message-ID: <411D4F41.4090405@eldocomp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=EXCUSE_16, LINES_OF_YELLING X-Spam-Level: X-Archive-Number: 200408/30 X-Sequence-Number: 4339 Wolfgang F=FCrtbauer wrote: If you have a choice (that is, this is a new application you are=20 developing or something) - go with ADO instead of DAO. About a year or=20 so back I did a conversion of an application from Access 97 to PG, and=20 most of it was in DAO. I had a lot of problems, switched to ADO and=20 things cleared up nicely (look in the archives for GENERAL and ODBC=20 lists to see my experiences). Now, some of this may have been related to a combo of older ODBC driver=20 issues and older PG installs, which may be different today - but I don't=20 regret having to switch the application over... Andrew > Dear list, >=20 > I have the following problem with VB6 and the Data control: >=20 > SQL Update statement generated by "data1.recordset.update" does > not work (0 records updated); here is an example: >=20 > -- from /var/log/postgresql -- > update Auftrag SET kdland=3D'D', kdplz=3D'54497', kdort=3D'MORBACH' ,=20 > kdstrasse=3D'Bahnhofstrasse 8' , > kdwhrg=3D'EUR' , kurs=3D'1'::float4 , sktotage=3D10 , sktoproz=3D'4'::flo= at4 ,=20 > sktotage2=3D0 , > sktoproz2=3D'0'::float4 , zieltage=3D30 , rabproz=3D'5'::float4 , valutat= age=3D2=20 > , zako=3D4 > WHERE "datum" =3D '2002-03-25'::date AND "lieferdatum" =3D '2002-03-25'::= date > AND "kdname" =3D 'MODE - TREFF' AND "kdbranche" =3D ' ' AND "kdland" =3D = 'D' > AND "kdplz" =3D '54497' AND "kdort" =3D 'MORBACH' AND "kdstrasse" =3D=20 > 'Bahnhofstrasse 8' > AND "kdwhrg" =3D 'EUR' AND "kurs" =3D '1'::float4 AND "sktotage" =3D 10 > AND "sktoproz" =3D '4'::float4 AND "sktotage2" =3D 0 AND "sktoproz2" =3D= =20 > '0'::float4 > AND "netto" =3D '122.7'::float4 AND "zieltage" =3D 30 AND "vkart" =3D 2 A= ND=20 > "zaart" =3D 1 > AND "druckkz" =3D 'D' AND "vertreter" =3D 19 AND "vtprovision" =3D 19 AND= =20 > "rabproz" =3D '7'::float4 > AND "rabwert" =3D '5.225'::float4 AND "provision" =3D 100 AND "valutatage= " =3D 0 > AND "zako" =3D 4 AND "nachlassprozent" =3D '0'::float4 AND "nachlasswert"= =3D=20 > '0'::float4 > AND "dringlichkeit" =3D 0 AND "nr" =3D 39277 AND "eadresse" =3D 0 AND "kd= nr" =3D=20 > 99624 > AND "notizen" =3D 'Brief VE dazu' > -- end from /var/log/postgresql -- >=20 > I found out, after removing the "rabwert" =3D '5.225'::float4 from the=20 > where-clause, > the update worked; so I had a look with the VB-Debugger at the value of= =20 > data1.recordset!rabwert > just before update and: the value was 5.225 >=20 > Why does the update not work ? >=20 > Environment: > ------------ >=20 > psql (PostgreSQL) 7.4.2 > ODBC-Driver 7.03.02.00 > VB 6 SP 5 >=20 > Data control created with: > With data1 > .Connect =3D myConn.Connect > .DatabaseName =3D "" > .DefaultType =3D dbUseODBC > .DefaultCursorType =3D dbUseODBCCursor > .Options =3D dbExecDirect > .Readonly =3D false > .RecordSource =3D "Select * from auftrag where nr =3D 39277" > .Exclusive =3D False > .Refresh > .edit > End With > Connection: > Set myConn =3D myWs.OpenConnection("faktconn", > dbDriverNoPrompt, > False, >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 > "ODBC;dsn=3DPostgreSQL;uid=3Dpostgres;pwd=3D;") >=20 >=20 > --------------------------------------------------------------------- > Wolfgang F=FCrtbauer Tel: +43 7612 77620 > Steinbichlstrasse 58d Mobil: +43 650 7762001 > A-4812 Pinsdorf w.fuertbauer@eunet.at=20=20=20=20= =20=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match >=20 >=20 >=20 -- CONFIDENTIALITY NOTICE -- This message is intended for the sole use of the individual and entity to w= hom it is addressed, and may contain information that is privileged, confid= ential and exempt from disclosure under applicable law. If you are not the = intended addressee, nor authorized to receive for the intended addressee, y= ou are hereby notified that you may not use, copy, disclose or distribute t= o anyone the message or any information contained in the message. If you ha= ve received this message in error, please immediately advise the sender by = reply email, and delete the message. Thank you.