GUys,
There is a bug in MyDAC 5.0.1.7
My code looks like that:
tableMain:=TMyTable.Create(nil);
tableMain.TableName:='signalsrelay';
try
tableMain.Connection:=mainMySQLServer ;
tableMain.Open;
if tableMain.RecordCount > 0 then
begin
tableMain.LockTable(ltWrite);
tableMain.SQL.Text:='Select * From signalsrelay';
tableMain.Execute;
for i := 1 to tableMain.RecordCount do
begin
tableMain.RecNo:=i;
new (rec);
rec.from:=tableMain.FieldByName('Provider').AsString;
rec.subject:=tableMain.FieldByName('Subject').AsString;
rec.content:=tableMain.FieldByName('Content').AsString;
commandsList.Add(rec);
end;
tableMain.SQL.Text:='Delete From signalsrelay';
tableMain.Execute;
tableMain.UnLockTable;
end;
except on E: Exception do
begin
AddError(error,'(ReadCommands) Exception - '+E.Message);
tableMain.UnLockTable;
end;
end;
In some time suddenly i get execption
FUpdateQuery = nil. StatementTypes = 128 (D:\Projects\Delphi\Dac\Source\DBAccess.pas, line 5168)
and then all the time this exception:
Not enough timers available
Not enough timers available
all the time.
this is not happening in 5.0.4 version.
Bug in MyDAC 5.0.1.7
You should not use the SQL property of the TMyTable class directly. Use TMyQuery instead.
I tried to reproduce this problem but with no success. Please send me a complete small sample at evgeniyD*crlab*com to demonstrate it, including script to create and fill table.
Also supply me the following information:
- exact version of Delphi, C++Builder or Kylix;
- exact version of MySQL server and MySQL client. You can see it in the Info sheet of TMyConnection Editor.
I tried to reproduce this problem but with no success. Please send me a complete small sample at evgeniyD*crlab*com to demonstrate it, including script to create and fill table.
Also supply me the following information:
- exact version of Delphi, C++Builder or Kylix;
- exact version of MySQL server and MySQL client. You can see it in the Info sheet of TMyConnection Editor.
The Lock and LockTable methods are implemented in the TCustomMyDataSet class, which is an ancestor for both TMyTable and TMyQuery. So you can use locking in both classes.iad wrote:1. TmyQuery is not support locking and this is what i need- correct me if i wrong.
I did that but it looks like the program is running successfully.iad wrote:2. this problem not happening all the time. the actual code is running as a procedure in a loop in 500 ms interval. try to to run it like that and you will see.
Unfortunately we will not be able to fix this problem if we do not have enough information to reproduce it.