Assertion failure
Posted: Mon 07 Jun 2010 13:57
I have a simple table with three columns. When I adding first record I get an error: Assertion failure: (D:\Projects\Delphi\Dac\Common\Source\MemData.pas, line 2651).
Line LockTable(ltExclusive) generate an error. When adding second and next records, everything is OK.
Version Info: SDAC 4.80.0.58, RAD Studio 2007 Version 11.0.2902.10471, SQL Server 2008 R2 10.50.1600.1
Do you have any suggestions.
Regards
k&k
Code: Select all
MSTransaction.AddConnection(MSConnection);
MSTransaction.StartTransaction;
if MSTransaction.Active
then begin
with MSQuery do
begin
LockTable(ltExclusive);
RefreshRecord;
Append;
...
Post;
RefreshRecord;
end;
MSTransaction.Commit;
MSTransaction.RemoveConnection(MSConnection);
end
else begin
MSTransaction.RemoveConnection(MSConnection);
end;
Version Info: SDAC 4.80.0.58, RAD Studio 2007 Version 11.0.2902.10471, SQL Server 2008 R2 10.50.1600.1
Do you have any suggestions.
Regards
k&k