Page 1 of 1
TZSQLProcessor, unknown token
Posted: 05.01.2007, 12:39
by tam
Latest zeos, Delphi 7, Createpos is TZSQLProcessor, Error is "unknown token"
Code: Select all
With CreatePos.Script do begin
Clear;
Add('set @pos=0;');
Add('update zeile set posnr=@pos:=@pos+1 where id=2');
end;
CreatePos.Execute;
Posted: 07.01.2007, 18:45
by tam
Sorry, the error msg is:
Incorrect token followed by ":"
This is a plain MySQL testcase:
Code: Select all
use test;
drop table if exists t1;
create table t1 (
posnr int(12)
);
insert into t1 values (10),(20),(30);
select * from t1;
set @pos=0;
update t1 set posnr=@pos:=@pos+1;
select * from t1;
drop table t1;
And this is the result:
Posted: 01.02.2007, 22:09
by tam
Any news on this one?
Posted: 15.05.2007, 13:10
by tam
Pls, anyone?
Posted: 15.05.2007, 14:44
by btrewern
I would guess that Zeos is parsing your SQL to find parameters. Sees the = after the : and barfs. Not sure what needs to be done to fix this though. Try setting ParamCheck to False.
Regards,
Ben
Posted: 15.05.2007, 14:55
by tam
Thanks, seems to work.