Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating SQL Server Connection without DSN defined
Message
From
10/02/2000 02:50:36
 
 
To
09/02/2000 09:02:54
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00329192
Message ID:
00329882
Views:
24
Hi Steve,

Thanks for what you provide. One more question:
How do I specify that I want a TCP/IP network connection? TIA




>
>Does this help,
>
>*!* Create string
>lcOdbc = 'AnsiNPW=No' + CHR(0) +;
> 'DSN=dsnnameyouwant' + CHR(0) +;
> 'Database=databasename' + CHR(0) +;
> 'Description= Connection to SQL backend' + CHR(0) +;
> 'OemToAnsi=No' + CHR(0) + ;
> 'Quotedid=Yes' + CHR(0) + ;
> 'Server=servername'
>
>DECLARE Integer SQLConfigDataSource IN odbccp32.dll Integer, Integer, String, String
>
>=SQLConfigDataSource( 0, 3, "SQL Server", lcOdbc ) && delete a DSN if it already exists
>
>=SQLConfigDataSource( 0, 1, "SQL Server", lcOdbc ) && recreate the DSN
>
>lnHandleName=SQLCONNECT( "dsnnameyouwant", "username", "password")
>
>Cheers
>Steve Lea
Chen Nan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform