When i try to run application, i get error message
Incorrect token followed by '':"
...
select @a := field from table; and Mysql and TZQuery
Moderators: gto, cipto_kh, EgonHugeist
I want use this construction for queryies like this:
select @a := (some long and complex expersion like case ... when),
@a+1,
@a+3,
@a*2
from some_table
Nice MySql feature. I don't need to rewrite complex expresions.
I try set ParamCheck = false but it does not help.....
Problem also is present in ZSQLProcessor.
When ParamCheck = True - Error message arrive in designer.
But when ParamCheck = false - then no errors from ZSQLProcessor.
My sugestion is - ZEOSLib try to use simbol after : as parameter (this is incorrect ofcourse)
Problem occurs in
procedure TZSQLStrings.RebuildAll;
....
{ Check for correct parameter type. }
if not (TokenType in [ttWord, ttQuoted]) then
raise EZDatabaseError.Create(SIncorrectToken);
here TokenType=ttSymbol and exception ofcourse....
select @a := (some long and complex expersion like case ... when),
@a+1,
@a+3,
@a*2
from some_table
Nice MySql feature. I don't need to rewrite complex expresions.
I try set ParamCheck = false but it does not help.....
Problem also is present in ZSQLProcessor.
When ParamCheck = True - Error message arrive in designer.
But when ParamCheck = false - then no errors from ZSQLProcessor.
My sugestion is - ZEOSLib try to use simbol after : as parameter (this is incorrect ofcourse)
Problem occurs in
procedure TZSQLStrings.RebuildAll;
....
{ Check for correct parameter type. }
if not (TokenType in [ttWord, ttQuoted]) then
raise EZDatabaseError.Create(SIncorrectToken);
here TokenType=ttSymbol and exception ofcourse....
Hi Ronalds.
What version of ZeosDbo are you using?
because i have added the ':=' token to the mysql token list in /parsesql/ZMySqlToken.pas along time ago
But this code was added along time ago. you should download latest ZeosDBO SVN version to have this fix, or at least erv 98 that si already published in the download section.
What version of ZeosDbo are you using?
because i have added the ':=' token to the mysql token list in /parsesql/ZMySqlToken.pas along time ago
Code: Select all
constructor TZMySQLSymbolState.Create;
begin
inherited Create;
Add('<=');
Add('>=');
Add('<>');
Add('<<');
Add('>>');
{BEGIN PATCH: added by fduenas}
Add(':=');
{END PATCH: added by fduenas}
end;
to fduenas
When i put some break points in
function TZSQLStrings.FindParam(const ParamName: string): Integer;
debuger stop and file path is correct.
I try to debug, my sugestion - problem is in function
Tokens := Tokenizer.TokenizeBufferToList(Text,
[toSkipComments, toUnifyWhitespaces]);
But there is complex, inherited code.....
May be you can give some debuging tips ?
I use delphi 5. Maybe there is problem? You can't repeat problem? Because problem accours every time if select contains :=
When i put some break points in
function TZSQLStrings.FindParam(const ParamName: string): Integer;
debuger stop and file path is correct.
I try to debug, my sugestion - problem is in function
Tokens := Tokenizer.TokenizeBufferToList(Text,
[toSkipComments, toUnifyWhitespaces]);
But there is complex, inherited code.....
May be you can give some debuging tips ?
I use delphi 5. Maybe there is problem? You can't repeat problem? Because problem accours every time if select contains :=