Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verify connection
Message
 
 
To
30/01/2003 14:19:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00747320
Message ID:
00747337
Views:
25
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform