Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating an ODBC Data Source Interface
Message
 
 
To
14/04/2003 15:24:51
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00771091
Message ID:
00777492
Views:
32
>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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform