Page 1 of 1
Posted: Thu 02 Jun 2005 04:18
by trayal
SDAC Help:
Use SQLDelete property to specify SQL statement that will be used when applying a deletion to a record
Also, when you executed
,
then Dm.Trengpol.SQLdelete code execute
Posted: Thu 02 Jun 2005 07:07
by Ikar
SQLDelete etc queries are processed automatically on execution Delete, Post, RefreshRecord. Usually there is no need to fill these properties as text of the query is generated automatically.
Use the next sequence:
Code: Select all
Dm.Trengpol.SQL.Clear;
Dm.Trengpol.SQL.Add('Delete from CRENGPOL where NUMPOL = '+Epoliza.Text);
Dm.Trengpol.Execute;
Posted: Sat 11 Jun 2005 09:27
by maciejw
instead of
Dm.Trengpol.SQL.Clear;
Dm.Trengpol.SQL.Add('Delete from CRENGPOL where NUMPOL = '+Epoliza.Text);
Dm.Trengpol.Execute;
you can use separate TMsSQL component (f.e. named TheSQL):
Dm.TheSQL.SQL.Text := 'Delete from CRENGPOL where NUMPOL = '+Epoliza.Text;
Dm.TheSQL.Execute;
Dm.Trengpol.Refresh;