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