Use sqlstringconnect for a dsn less connection.


lcstr = "driver={SQL Server};server=someserver;database=somedb;network= dbmssocn;dsn=;"
lnsqlh = sqlstringconnect(lcstr)

You need a registry entry in the MSSQLServer\Clien\ConnectTo key to identify the server. An example for a 6.5 database is shown below.


REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Client]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Client\DB-Lib]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Client\ConnectTo]
"DSQUERY"="DBMSSOCN"
"servername"="DBMSSOCN,ip address"




The following link ( http://www.able-consulting.com/ADO_Conn.htm) contains very useful ADO connection strings for various data sources.