Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't Issue SqlSetProp('DispLogin',3) before connection
Message
 
 
À
14/08/2002 18:54:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00689771
Message ID:
00689776
Vues:
20
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform