Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote data
Message
 
 
To
17/11/2000 15:45:47
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00443185
Message ID:
00443248
Views:
11
>What does this do? Specifically '#'? --->iResult # -1
From on-line help:
SQLEXEC( ) returns the number of result sets if there is more than one. SQLEXEC( ) returns 0 if it is still executing and returns 1 when it has finished executing. SQLEXEC( ) returns –1 if a connection level error occurs.

I'm not 100% sure but I think SQLEXEC() will only return 1 or -1, unless you have configured the connection to allow asynchronous execution. The default is for control not to return to VFP until the SQLEXEC is complete.

The # is the same as <>. I.e. if there was no error then you can try copying the records to a real dbf. You could expand the check to include that the "MyNewCursor" exists and actually contains records e.g.
IF iResult # -1 AND USED( "MyNewCursor" ) AND RECCOUNT( "MyNewCursor" ) > 0
   COPY TO ....\path\MyRealDbf
ENDIF
censored.
Previous
Reply
Map
View

Click here to load this message in the networking platform