Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't Issue SqlSetProp('DispLogin',3) before connection
Message
 
 
To
14/08/2002 18:54:24
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00689771
Message ID:
00689776
Views:
21
You can use handle 0 - VFP ODBC default environment.
* Disable display of ODBC errors 
= SQLSETPROP(0,'DispWarnings',.F.)  
* Disable login prompt
= SQLSETPROP(0,'DispLogin',3)  
lnConn = SQLSTRINGCONNECT(lcConnStr)
>I am running an .EXE that is meant to run unattended. Unfortunately in a 24/7 environment we occasionally have network hiccups that sever our database connection.
>
>When the app begins its execution loop and tries to connect to the database (which is unavailable), the default connection behavior pops up a "Microsoft Sql Server Login" dialog box (Exact text varies, but typically either "General network error." or "Timeout Expired"). Once I click "OK" a second dialog appears captioned "Sql Server Login" and asks for username, password, etc. Once I click "OK" here, my app logs an error and continues.
>
>I need to be able to suppress these modal dialogs so my app doesn't halt execution.
>
>My best guess is to issue SqlSetProp(lnConn,"DispLogin",3) to disable login prompts, but how can I do this if I don't have a connection handle until I get a successful connection?
>
>Any help appreciated ...
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform