Update Error of SQLUpdate

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 2
Joined: Thu 11 Oct 2007 01:45

Update Error of SQLUpdate

Post by roykty » Thu 11 Oct 2007 02:07

I use delphi 5.0 and use version 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.Add(UPDATE table SET field1=:field1, field2=:field2 WHERE fID=:fID);

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

the program hang when running mtTable.Post();

What may be the reason cause this problem?

Thx for your help.


Posts: 2
Joined: Thu 11 Oct 2007 01:45

Post by roykty » Thu 11 Oct 2007 02:40

Moreover, I add a condition for the Table
mtTable.FilterSQL := 'fID = 1719'
mtTable.Active := true;

Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 11 Oct 2007 14:13

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.

Post Reply