Sqltalk, Oracle and bind variables

General discussion forum about all databases other than SqlBase.
bph

Sqltalk, Oracle and bind variables

Post by bph » 06 Apr 2016, 13:58

In oracle (11 and 12 tested), we have some issues with Sqltalk batch with bind variables.

create table TESTBIND (Z1 varchar(5), Z2 varchar(5));
insert into TESTBIND (Z1, Z2) values ('z1', 'z2');

in TD6.3sp1, SqlTalk 10.0.0.1-PTF1 :

update TESTBIND
set Z2 = :1
where Z1 = :2
\
$datatypes CHARACTER,CHARACTER
Test2,z1
/
-- 1 ROW UPDATED

update TESTBIND
set Z2 = :2
where Z1 = :1
\
$datatypes CHARACTER,CHARACTER
z1,test3
/

=> 0 ROWS UPDATED !!!

the problem also exists with insert :
insert into TESTBIND (Z1, Z2) values (:2, :1)
\
z2,z1
/
=> Z1='z2' & Z2='z1' !!!


in Previous release (TD3.1), we have the same issues, if we setuped into our Sql.ini
[oragtwy]
uselob=1

with uselob=0 (default), we don't encounter this issues.

uselob=0 doesn't works in TD6.3 (we suppose the documentation hasn't been updated to remove it).

The Sqltalk help still says :
· A bind variable name starts with a colon (:) and is followed by a number that refers to the relative position among the data items associated with the SQL command, (such as :1, :2, :3).

but in fact it seems that for oracle the order of detection of bind is now taken in account rather than the number given within Sqltalk.

Mike Vandine

Re: Sqltalk, Oracle and bind variables

Post by Mike Vandine » 13 Jun 2016, 03:05

Hi,

Please note that SQLTalk is a very old product and is not being changed at all. It was designed to work with SQLBase. The fact that it works with Oracle at all is amazing.

If something changes with one of the backends (*not* SQLBase), there is nothing that we can do about it. This program will not be modified.

Best regards,

Return to “General Discussion”

Who is online

Users browsing this forum: [Applebot], [Ccbot] and 0 guests