How to Use MYQuery.SQLDelete........
Posted: Mon 22 May 2006 08:53
hi
I put in my DataModule a component TMYQUERY that is connect to a database, i insert at DesignTime the sql for deleting record...
DELETE FROM progetti
WHERE
DATAULTA = :Old_DATAULTA
In the avent CLICKBOTTON i want delete all the record in the table.
so i think i have to execute the query.... so i do that...
if not SaJConn.InTransaction then
begin
SaJConn.StartTransaction;
TabDel.SQLDelete.Add(TabDel.SQLDelete.CommaText);
TabDel.Execute;
SaJConn.Commit;
end;
**but i think its no the way......someone can help me?
thanks a lot
I put in my DataModule a component TMYQUERY that is connect to a database, i insert at DesignTime the sql for deleting record...
DELETE FROM progetti
WHERE
DATAULTA = :Old_DATAULTA
In the avent CLICKBOTTON i want delete all the record in the table.
so i think i have to execute the query.... so i do that...
if not SaJConn.InTransaction then
begin
SaJConn.StartTransaction;
TabDel.SQLDelete.Add(TabDel.SQLDelete.CommaText);
TabDel.Execute;
SaJConn.Commit;
end;
**but i think its no the way......someone can help me?
thanks a lot