Complete newbie question!
Posted: 10.02.2009, 15:45
Hello,
A complete newbie, so be gentle!
Using Delphi 6, Zeoslib 6.6.4 & MySQL 5.1.31 under Windows.
When I try a multi-row update like this:
I get this error message:
"Project quoteit.exe raised exception class EZSQLException with message 'SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE LineItemTable SET DesignTime = 55 WHERE Projectnumber=505 AND LineNumber=' at Line 2. Process stopped. Use Step or Run to continue."
The query executes fine if it is only one line.
I have indeed looked in the MySQL manual, but can't find the answer - though I suspect it will turn out to be obvious!
Can anyone help me, please?
Thanks.
A complete newbie, so be gentle!
Using Delphi 6, Zeoslib 6.6.4 & MySQL 5.1.31 under Windows.
When I try a multi-row update like this:
Code: Select all
QuotesZQuery.SQL.Clear;
QuotesZQuery.SQL.Add('UPDATE LineItemTable SET DesignTime = ' + IntToStr(55) + ' WHERE Projectnumber=504 AND LineNumber=1;');
QuotesZQuery.SQL.Add('UPDATE LineItemTable SET DesignTime = ' + IntToStr(55) + ' WHERE Projectnumber=505 AND LineNumber=1');
QuotesZQuery.ExecSQL;
I get this error message:
"Project quoteit.exe raised exception class EZSQLException with message 'SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UPDATE LineItemTable SET DesignTime = 55 WHERE Projectnumber=505 AND LineNumber=' at Line 2. Process stopped. Use Step or Run to continue."
The query executes fine if it is only one line.
I have indeed looked in the MySQL manual, but can't find the answer - though I suspect it will turn out to be obvious!
Can anyone help me, please?
Thanks.