Bug in MyDAC 5.0.1.7
Posted: Fri 08 Jun 2007 12:05
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.
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.