Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating an ODBC Data Source Interface
Message
 
 
À
14/04/2003 15:24:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00771091
Message ID:
00777492
Vues:
30
>Hi Sergey,
>
>Do you where I can get examples on how to create DSN-less? TIA
* Suppress ODBC error dialog
= (SQLSETPROP(0,'DispWarnings',.F.)  && No errors
* Suppres login dialog 
= (SQLSETPROP(0,'DispLogin',3)  && No login -- error on fail
lcServerName = "..."
lcUserName = "..."
lcPasword = "..."

TEXT TO lcConnStr TEXTMERGE NOSHOW
DRIVER=SQL Server;
UID=<<lcUserName>>;
PWD=<<lcPasword>>;
Network=DBMSSOCN;
DATABASE=pubs;
SERVER=<<lcServerName>>;
ENDTEXT

lnConn = SQLSTRINGCONNECT(lcConnStr )
IF lnConn < 0
  * Use AERROR() function to get ODBC error info
  * Process error
ENDIF
To see ODBC connection string create FILE DSN and than open it in any text editor.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform