Page 1 of 1

Update Error of SQLUpdate

Posted: Thu 11 Oct 2007 02:07
by roykty
I use delphi 5.0 and use version 2.45.2.26 08.06.04 of SDAC
and I use SQL Server 2000
After I insert the SQLUpdate in the TTable, the program hang(have not any error msg) and have not any reaction.

The following is part of my code :
mtTable.SQLUpdate.Clear();
mtTable.SQLUpdate.Add(UPDATE table SET field1=:field1, field2=:field2 WHERE fID=:fID);

mtTable.Edit();
mtTable.FieldByName('field1').AsString := 'abc';
mtTable.FieldByName('field2').AsString := '456';
mtTable.Post();

the program hang when running mtTable.Post();

What may be the reason cause this problem?

Thx for your help.

Regards
Roy

Posted: Thu 11 Oct 2007 02:40
by roykty
Moreover, I add a condition for the Table
mtTable.FilterSQL := 'fID = 1719'
mtTable.Active := true;

Posted: Thu 11 Oct 2007 14:13
by Antaeus
There can be different reasons for this problem. Please send me a complete small sample at sdac*crlab*com to demonstrate it, including script to create and fill table.