Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verify connection
Message
 
 
À
30/01/2003 14:19:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00747320
Message ID:
00747337
Vues:
26
This message has been marked as the solution to the initial question of the thread.
Tom,

You can use SqlConnect() or SqlStringConnect and check return value. Before you do that, disable ODBC error messages.
* Suppress ODBC error dialog
IF SQLGETPROP(0,'DispWarnings')
	= (SQLSETPROP(0,'DispWarnings',.F.)  && No errors
>ENDIF
You can also suppres login dialog if needed
IF SQLGETPROP(0,'DispLogin') <> 3
	= (SQLSETPROP(0,'DispLogin',3)  && No login -- error on fail
ENDIF
AERROR() function can be used to return detailed info about ODBC error.

>The connection designer has a button to verify a connection. I am trying to do this programmatically to check the status of a remote connection within my code before trying to access it. Anybody have an idea on how the connection designer does it?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform