Problem with VB6, DAO, Data Control: Update does not work

From: Wolfgang Fürtbauer <w(dot)fuertbauer(at)eunet(dot)at>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Problem with VB6, DAO, Data Control: Update does not work
Date: 2004-08-13 18:59:08
Message-ID: 6.0.3.0.2.20040813204437.026d24e0@mbox.tiscali-business.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Dear list,

I have the following problem with VB6 and the Data control:

SQL Update statement generated by "data1.recordset.update" does
not work (0 records updated); here is an example:

-- from /var/log/postgresql --
update Auftrag SET kdland='D', kdplz='54497', kdort='MORBACH' ,
kdstrasse='Bahnhofstrasse 8' ,
kdwhrg='EUR' , kurs='1'::float4 , sktotage=10 , sktoproz='4'::float4 ,
sktotage2=0 ,
sktoproz2='0'::float4 , zieltage=30 , rabproz='5'::float4 , valutatage=2 ,
zako=4
WHERE "datum" = '2002-03-25'::date AND "lieferdatum" = '2002-03-25'::date
AND "kdname" = 'MODE - TREFF' AND "kdbranche" = ' ' AND "kdland" = 'D'
AND "kdplz" = '54497' AND "kdort" = 'MORBACH' AND "kdstrasse" =
'Bahnhofstrasse 8'
AND "kdwhrg" = 'EUR' AND "kurs" = '1'::float4 AND "sktotage" = 10
AND "sktoproz" = '4'::float4 AND "sktotage2" = 0 AND "sktoproz2" = '0'::float4
AND "netto" = '122.7'::float4 AND "zieltage" = 30 AND "vkart" = 2 AND
"zaart" = 1
AND "druckkz" = 'D' AND "vertreter" = 19 AND "vtprovision" = 19 AND
"rabproz" = '7'::float4
AND "rabwert" = '5.225'::float4 AND "provision" = 100 AND "valutatage" = 0
AND "zako" = 4 AND "nachlassprozent" = '0'::float4 AND "nachlasswert" =
'0'::float4
AND "dringlichkeit" = 0 AND "nr" = 39277 AND "eadresse" = 0 AND "kdnr" = 99624
AND "notizen" = 'Brief VE dazu'
-- end from /var/log/postgresql --

I found out, after removing the "rabwert" = '5.225'::float4 from the
where-clause,
the update worked; so I had a look with the VB-Debugger at the value of
data1.recordset!rabwert
just before update and: the value was 5.225

Why does the update not work ?

Environment:
------------

psql (PostgreSQL) 7.4.2
ODBC-Driver 7.03.02.00
VB 6 SP 5

Data control created with:
With data1
.Connect = myConn.Connect
.DatabaseName = ""
.DefaultType = dbUseODBC
.DefaultCursorType = dbUseODBCCursor
.Options = dbExecDirect
.Readonly = false
.RecordSource = "Select * from auftrag where nr = 39277"
.Exclusive = False
.Refresh
.edit
End With
Connection:
Set myConn = myWs.OpenConnection("faktconn",
dbDriverNoPrompt,
False,
"ODBC;dsn=PostgreSQL;uid=postgres;pwd=;")

---------------------------------------------------------------------
Wolfgang Fürtbauer Tel: +43 7612 77620
Steinbichlstrasse 58d Mobil: +43 650 7762001
A-4812
Pinsdorf w(dot)fuertbauer(at)eunet(dot)at

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Peter Eisentraut 2004-08-13 19:01:17 Re: ODBC Standards Compliancy
Previous Message Tom Lane 2004-08-13 18:16:33 Re: Query is significantly slower on faster machine