PROCEDURE RecallRecord LPARAMETERS tcTable, tcFilter IF VARTYPE(tcTable) <> "C" OR EMPTY(tcTable) RETURN -1 ENDIF IF VARTYPE(tcFilter) <> "C" OR EMPTY(tcFilter) RETURN -1 ENDIF LOCAL lnSelect lnSelect = SELECT() IF NOT USED(tcTable) USE (tcTable) IN 0 AGAIN ENDIF SELECT (tcTable) SET DELETED OFF RECALL FOR EVALUATE(tcFilter) SET DELETED ON SELECT (lnSelect) RETURN 1 ENDPROCI then deleted a bunch of records in a zipcodes [zips] table, then called the SP:
SQLEXEC(lnHandle, 'select RecallRecord([zips], [mod(zips.keyid,2) = 1]) from dummy', 'crsTest')The second parm is a filter to recall only records whose KeyID field is odd. What is notable is that you can not use macro expansion in a stored proc that is to be called via ODBC/SPT. When I did, I got an ODBC error -- feature not available.