Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
How is it possible to delete all records of a table in the DynamicUpdateCommand..
Is there also a possibility to use placeholders like %
set result = ActiveDocument.DynamicUpdateCommand("DELETE FROM Test WHERE col like 'abc%' ")
There is no complete documentation about DynamicUpdateCommand so we just have to test to find out what works.
I have succeeded to delete all records by adding a dummy TRUE condition into a WHERE clause:
sub deletetest
SET Result = ActiveDocument.DynamicUpdateCommand("DELETE FROM Test WHERE -1")
if Result = false then
MsgBox Result.ErrorMessage
end if
end sub
Or if that makes more sense: "DELETE FROM Test WHERE 1=1"