Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine whether cursoradapter connection is good
Message
 
À
05/04/2005 00:00:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01001404
Message ID:
01001412
Vues:
28
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform