Topic: Truncate


I am trying to delete all information within table before, replenishing it with new data.

I've tried using TRUNCATE at the beginning of the coding to empty my Table before replenishing, using an action button SQL QUERY (dtReportAssess = Table name)

          truncate Table dtReportAssess ;             


And have been getting an error.

          Error message;
          near "truncate" : synax error.

Any suggestions and any help would be great.

Re: Truncate

Please see the attached - it probably does a bit more than you want but you could cut the basic code.

Post's attachments

Attachment icon 336.98 kb, 510 downloads since 2020-10-16 

Re: Truncate … _table.htm

Re: Truncate

You can also add this query after deleting all records for it to function like truncate.

SQLExecute('DELETE FROM sqlite_sequence WHERE name="yourtablename"')