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

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

Antaeus
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