Page 1 of 1

#42000 You have an error, blah blah blah

Posted: Wed 14 Mar 2007 08:54
by trob
Hi,

I have a problem with MyDAC In Delphi.

In running time when the code arrives to Lock(lrDelayed), i get an error.

The code is:

Code: Select all

procedure TDataMod.TBBeforeEdit(DataSet: TDataSet);
begin
  TBgyerek.Connection.StartTransaction;
  TBgyerek.Lock(lrDelayed);
  TBgyerekAfterScroll(DataSet);
end;
The error message is:
#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? LOCK IN SHARE MODE' at line 3.

I don't know what happened, but yesterday it was OK.

This was in the log:
SELECT NULL FROM gyerek
WHERE
jellapkey = ?
LOCK IN SHARE MODE

I don't understand why is there a '?'

Posted: Wed 14 Mar 2007 14:28
by Antaeus
Thank you for information. We have already fixed this problem in MyDAC 5. This fix will be available in the final release of MyDAC 5.

Posted: Wed 14 Mar 2007 21:00
by trob
It is good.

But could you tell me what was the problem?
1. I got very courios.
2. I could not go on with my exercise...

Thx.

Posted: Thu 15 Mar 2007 09:22
by Antaeus
This problem has to do with performance optimizations in MyDAC SQL generators.

Posted: Thu 15 Mar 2007 18:39
by trob
And what would changed in a moment? It was working fine, and at once it refused to work...

Could you upload the new version's beta in present state?

Posted: Fri 16 Mar 2007 13:13
by Antaeus
We are going to upload new version of MyDAC with this fix included in the next week.