Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLStringConnect -- I just want a return code!
Message
From
11/12/2005 15:41:37
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01076982
Message ID:
01076998
Views:
18
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
Previous
Reply
Map
View

Click here to load this message in the networking platform