Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Connection
Message
 
 
À
07/02/2003 09:01:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00750539
Message ID:
00750550
Vues:
21
You can supress error and login dialogs
* Suppress ODBC error dialog
IF SQLGETPROP(0,'DispWarnings')
  = (SQLSETPROP(0,'DispWarnings',.F.)  && No errors
>ENDIF
* Suppres login dialog if needed
IF SQLGETPROP(0,'DispLogin') <> 3
  = (SQLSETPROP(0,'DispLogin',3)  && No login -- error on fail
ENDIF
...
IF SQLSTRINGCONNECT(lcConnStr)< 1
  * Error. Use AERROR() function to return detailed info about ODBC error.
  * Process this error
ENDIF
>How do I prevent the select data source window from poping up when I execute the following code? Why doesn't this code just create the connection string?
>
>
>lcDSNLess="DRIVER = {SQL Server};" ;
>+ "SERVER=[ServerName];" ;
>+ "UID=[useid];" ;
>+ "PWD=[password];" ;
>+ "DATABASE=[database]"
>
>lnconnhandle = Sqlstringconn(lcDSNless)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform