Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLStringConnect -- I just want a return code!
Message
De
11/12/2005 15:41:37
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Divers
Thread ID:
01076982
Message ID:
01076998
Vues:
17
Thank you very much. Works just as needed / Jim

>>Am using SQLStringConnect to talk to a MS Access database. If the connection cannot be made, for any reason, I'd like to be able to just get a return code informing me of such. (This is occurring in a background job with no user to read error messages.)
>>
>>However, I'm getting a Messagebox that says "Database My.mdb needs to be repaired". This may well be useful information, but I'd like to just know whether my connection succeeded by getting a positive return code.
>>
>>Is this possible?
>>
>>Thanks in advance,
>
>
SQLSETPROP(0,"DispWarnings",.f.)
>SQLSETPROP(0,"DispLogin",3)
>sqlHandler = SQLSTRINGCONNECT(your_conn_string)
>IF sqlHandler < 0
>   MESSAGEBOX([No connection])
>ENDIF
Jim Nelson
Newbury Park, CA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform