dbTalk Databases Forums  

Re: [BUGS] Problem with driver ODBC / VB

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] Problem with driver ODBC / VB in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hendrik Müller
 
Posts: n/a

Default Re: [BUGS] Problem with driver ODBC / VB - 01-24-2005 , 12:58 AM






Kalitech schrieb:
Quote:
Hello,



These tests are done with the 2 versions of the driver 7.3



Table User description : u_num int4 nextval( …), u_comm varchar(512)



In my table I have one row :

u_num 1

u_comm ‘hello world <CR><LF> all is fine.’



Imagine I want to delete this row

Sql = “select * from user where u_num=1”

Set rs = odbc_cnx.OpenResultset( sql, rdOpenKeyset,
rdConcurRowver )

Rs.Edit

Rs.delete

Rs.close

The row is not deleted. Of course because in the log file, I find

Sql = “Delete from user where u_num=1 and u_comm=‘hello world

all is fine.’”



I have found how to do :

Sql = “select u_num from user where u_num=1”

Set rs = odbc_cnx.OpenResultset( sql, rdOpenKeyset,
rdConcurRowver )

Rs.Edit

Rs.delete

Rs.close

And now it is ok since in the log file, I find

Sql = “Delete from user where u_num=1”



But I have the same problem with update :

Sql = “select u_num, u_comm from user where u_num=1”

Set rs = odbc_cnx.OpenResultset( sql, rdOpenKeyset,
rdConcurRowver )

Rs.Edit

Rs(“u_comm”).value = “bonjour”

Rs.update

Rs.close

In the log file, I find

Sql = “Update from user set u_comm=’bonjour’ where u_num=1
and u_comm=‘hello world

all is fine.’”

Is there anything to do to obtain from the driver something like :

Sql = “Update from user set u_comm=’bonjour’ where u_num=1”

Since we don’t need the second clause.



Thank you very much if you have a solution.



Hélène FESTOC

Kalitech - 01 69 41 97 54
Your must set an index on u_num.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.