Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine whether cursoradapter connection is good
Message
 
To
05/04/2005 00:00:33
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01001404
Message ID:
01001412
Views:
23
>I am using a cursoradapter to attach to sql server data. I have a base class that all CA's are inherit from. My question is: is there a way to determine whether the sql server connection is good in a clean way so that I can show a decent error message to users and abort the process? I currently see the sql server login screen if the login doesn't connect as planned i.e. Win 98 machines with old MDAC.
>
>thanks
>
>bonnie

I am not sure I understood your question right, but try this:
sqlServer1       = "DRIVER=SQL Server....."
SQLSETPROP(0,"DispWarnings",.f.)
SQLSETPROP(0,"DispLogin",3)           && Check help to see
sqlHandler       = SQLSTRINGCONNECT(sqlServer1)
IF sqlHandler < 0
***   Error message
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform