Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote data
Message
 
 
À
17/11/2000 15:45:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00443185
Message ID:
00443248
Vues:
19
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform