Skip site navigation (1) Skip section navigation (2)

Re: Strange Update query ...

From: Hélder M(dot) Vieira <hmv(at)mail(dot)telepac(dot)pt>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Strange Update query ...
Date: 2006-04-01 09:13:15
Message-ID: 004001c6556c$930fc130$580bfea9@hmv02 (view raw or flat)
Thread:
Lists: pgsql-odbc
I tried to replicate the situation you describe, without success.
I guess ADO for some reason is trying to build an SQL statement 
corresponding to a parameter query.
I'd bet on a ADO misinterpretation of your intention caused by the myvalue1, 
myvalue2 and myvalue3 data types.
Could you post the DIM statements of those variables ?


Helder M. Vieira




>   Set rs = New ADODB.Recordset
>   rs.Open "SELECT id,myfield1,myfield2,myfield3 from mytable where 
> id=6",dbConn, adOpenKeyset, adLockOptimistic, adCmdText
>
>   rs("myfield1").value = myvalue1
>   rs("myfield2").value = myvalue2
>   rs("myfield3").value = myvalue3
>   rs.Update
>   rs.close
>   set rs=Nothing
>
...
>
> UPDATE mytable SET myfield1=myvalue1,myfield2=myvalue2,myfield3=myvalue3 
> WHERE (id=6 AND myfield1=myvalue1 AND myfield2=myvalue2 AND 
> myfield3=myvalue3 )'



In response to

Responses

pgsql-odbc by date

Next:From: Hiroshi InoueDate: 2006-04-01 23:12:39
Subject: Re: Strange Update query ...
Previous:From: Hiroshi InoueDate: 2006-04-01 06:30:52
Subject: Re: Error when getting text longer than MaxLongVarcharSize

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group