>I am having a problem in one of my applications, and I think it may be careless use of the ZAP command. A table is getting cleared when I don't want it to. If I have code like below, if there are no records in the DEAL table and I try to ZAP it, are there any consequences? Should I be issuing the ZAP command within the IF statement?
>
>
>CREATE CURSOR DEAL (WDIST C(2), IDIST C(2), VWGDST C(2));
>
>lnConnHandle=Sqlstringconnect(lcConnString)
>=SQLEXEC(lnConnHandle, lcSQLString, 'DEAL')
>=SQLDISCONNECT(lnConnHandle)
>
>SELECT DEAL
>
>IF RECCOUNT() > 0
> * Additional code
>ENDIF
>
>ZAP
>
Consequences? You will probably lose a fraction of a second. Visual FoxPro won't bomb out if you try to ZAP a table with zero records.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)