knowledge-database (beta)

Current group: pgsql.bugs

Problem with driver ODBC / VB

Problem with driver ODBC / VB  
Kalitech
 Re: Problem with driver ODBC / VB  
=?windows-1252?Q?Hendrik_M=FCller?=
From:Kalitech
Subject:Problem with driver ODBC / VB
Date:Wed, 19 Jan 2005 10:19:00 +0100
This is a multi-part message in MIME format.

------=_NextPart_000_00A1_01C4FE10.4BC6FB40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,
=20
These tests are done with the 2 versions of the driver 7.3
=20
Table User description : u_num int4 nextval( =85), u_comm varchar(512)
=20
In my table I have one row :=20
u_num 1
u_comm =91hello world all is fine.=92
=20
Imagine I want to delete this row
Sql =3D =93select * from user where u_num=3D1=94
Set rs =3D 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 =3D =93Delete from user where u_num=3D1 and =
u_comm=3D=91hello
world
all is fine.=92=94
=20
I have found how to do :
Sql =3D =93select u_num from user where u_num=3D1=94
Set rs =3D 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 =3D =93Delete from user where u_num=3D1=94
=20
But I have the same problem with update :
Sql =3D =93select u_num, u_comm from user where u_num=3D1=94
Set rs =3D odbc_cnx.OpenResultset( sql, rdOpenKeyset,
rdConcurRowver )
Rs.Edit
Rs(=93u_comm=94).value =3D =93bonjour=94
Rs.update
Rs.close
In the log file, I find
Sql =3D =93Update from user set u_comm=3D=92bonjour=92 where =
u_num=3D1
and u_comm=3D=91hello world
all is fine.=92=94
Is there anything to do to obtain from the driver something like :
Sql =3D =93Update from user set u_comm=3D=92bonjour=92 where =
u_num=3D1=94
Since we don=92t need the second clause.
=20
Thank you very much if you have a solution.
=20
H=E9l=E8ne FESTOC
Kalitech - 01 69 41 97 54
=20
=20

------=_NextPart_000_00A1_01C4FE10.4BC6FB40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Diso-8859-1">






namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"PersonName"/>





style=3D'tab-interval:35.4pt'>



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Hello,>



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'> >



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>These tests are done =
with the
2 versions of the driver 7.3



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'> >



style=3D'font-size:10.0pt;
font-family:Arial'>Table User description : class=3DSpellE>u_num
int4 nextvalclass=3DGramE>(
…), u_comm =
class=3DSpellE>varchar(512)



style=3D'font-size:10.0pt;
font-family:Arial'> 



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>In my table I have one =
row :



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
u_numstyle=3D'mso-tab-count:2'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
1



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
u_commstyle=3D'mso-tab-count:1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
‘hello
world <CR><LF> all is =
fine.’



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'> >



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Imagine I want to =
delete this
row



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
Sql =3D “select * from =
user where u_num=3D1”



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
Set rs =3D =
odbc_cnx.OpenResultset( sql, rdOpenKeyset,
rdConcurRowver )



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
Rs.Edit



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
Rs.delete



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
Rs.close



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>The row is not =
deleted. Of
course because in the log file, I find



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
Sql =3D “Delete from =
user where u_num=3D1 and u_comm=3D‘hello
world



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>all is =
fine.’”



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'> >



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>I have found how to do =
:



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
Sql =3D “select u_num =
from user where u_num=3D1”



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
Set rs =3D =
odbc_cnx.OpenResultset( sql, rdOpenKeyset,
rdConcurRowver )



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
Rs.Edit



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
Rs.delete



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
Rs.close



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>And now it is ok since =
in the
log file, I find



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
Sql =3D “Delete from =
user where u_num=3D1”



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'> >



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>But I have the same =
problem with
update :



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
Sql =3D “select u_num, =
u_comm from user where u_num=3D1”



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
Set rs =3D =
odbc_cnx.OpenResultset( sql, rdOpenKeyset,
rdConcurRowver )



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
Rs.Edit



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
Rs(“u_comm”).value =3D =
“bonjour”



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
Rs.update



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =
Rs.close



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>In the log file, I =
find



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
Sql =3D “Update from =
user set u_comm=3D’bonjour’
where u_num=3D1 and u_comm=3D‘hello =
world



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>all is =
fine.’”



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Is there anything to =
do to
obtain from the driver something like :



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>style=3D'mso-tab-count:
1'>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
Sql =3D “Update from =
user set u_comm=3D’bonjour’
where u_num=3D1”



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Since we don’t =
need the
second clause.



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'> >



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Thank you very much if =
you
have a solution.



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'> >



style=3D'font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB;mso-no-proof:yes'>H=E9l=E8=
ne
FESTOC
style=3D'mso-ansi-language:EN-GB;mso-no-proof:
yes'>



lang=3DEN-GB
=
style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-GB;mso-n=
o-proof:
yes'>Kalitech
face=3DArial>lang=3DEN-GB =
style=3D'font-size:10.0pt;font-family:Arial;mso-ansi-language:EN-GB;
mso-no-proof:yes'> - 01 69 41 97 54
style=3D'mso-ansi-language:EN-GB;mso-no-proof:yes'>

=


lang=3DEN-GB
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB;mso-no-proof:yes'> =
;
lang=3DEN-GB style=3D'mso-ansi-language:EN-GB'>



lang=3DEN-GB
style=3D'font-size:12.0pt;mso-ansi-language:EN-GB'> n>









------=_NextPart_000_00A1_01C4FE10.4BC6FB40--
From:=?windows-1252?Q?Hendrik_M=FCller?=
Subject:Re: Problem with driver ODBC / VB
Date:Fri, 21 Jan 2005 12:26:37 +0100
Kalitech schrieb:
> 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 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.
   

Copyright © 2006 knowledge-database   -   All rights reserved