TMStable.SQLDelete Again

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 10 Jun 2005 07:10

Leave this property empty. At the most cases it is enouhg.

maciejw
Posts: 11
Joined: Sun 20 Mar 2005 10:37
Location: Poland
Contact:

Post by maciejw » Sat 11 Jun 2005 08:48

if you leave empty delete code in update SQL tab.... you using TMsTable as simple as standard TTable......
f.e. MyTable: TMsTable .......... if you put MyTable.Delete in the code ... the current record will be deleted.

But if you think about delete code in update SQL tab ..... i think you telling about TMsQuery rather than TMsTable.
If you leave it empty it works the same way as TMsTable.
In this area you can insert any SQL code which be executed by server when you need delete record. Remember, that it's SQL (not pascal) code.
If you need detailed story how it's work send me an email described what is your problem.

maciejw
Posts: 11
Joined: Sun 20 Mar 2005 10:37
Location: Poland
Contact:

Post by maciejw » Sat 11 Jun 2005 08:55

for delete some records in one time please use TMsSQL component....
f.e. MySQL: TMsSQL;

MySQL.SQL.Text := 'DELETE FROM table_name WHERE Country = ''Poland''';
MySQL.Execute;

in this moment all records where field Country contents 'Poland' will be deleted.

but ..... Don't forget to REFRESH any table or query using table_name in

Post Reply