Page 1 of 1

Assertion failure

Posted: Mon 07 Jun 2010 13:57
by k&k
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).

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;
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

Posted: Tue 08 Jun 2010 08:58
by Dimon
I can not reproduce the problem.
Please try replacing MSTransaction.StartTransaction with MSConnection.StartTransaction and check if the problem still exists.

Posted: Tue 08 Jun 2010 11:05
by k&k
Unfortunately, it's still the same.

Posted: Tue 08 Jun 2010 13:07
by Dimon
You should open the query before executing LockTable.
If it doesn't solve the problem, please compose a small sample to demonstrate the problem and send it to dmitryg*devart*com, including script to create database objects.

Posted: Wed 09 Jun 2010 09:06
by k&k
I sent a sample.

Posted: Wed 09 Jun 2010 13:12
by Dimon
Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next SDAC build.