Allows to run one or several FoxPro commands that cannot be executed via the core SQL statements, such as SELECT, UPDATE, etc.

EXECSCRIPT(cExpression [, eParameter1, eParameter2, ...])


The value contains set of commands with required parameters to be executed. Enclose every command in square brackets, and use CHR(13) to separate code lines.



The following example shows how to select deleted records into a new DBF table:

EXECSCRIPT([SET DELETED OFF] + CHR(13) + [SELECT * FROM "D:\Data\orders.dbf" WHERE DELETED() INTO TABLE "D:\Data\DeletedOrders.dbf"])

The command creates a standalone index file (.idx) named 'index_file' based on the 'to_name' field:

EXECSCRIPT([USE 'D:\Data\orders.dbf'] + CHR(13) + [INDEX ON to_name TO index_file])