I don't know how your DSN-less connection string looks like, but I think that what you are missing is the "address" and "network" parameters in the connection string.
Address could be an IP address, followed by ",1433" which is the port that SQL Server listens to.
Network indicates the network library that the SQL Server ODBC driver will use. It refers to the actuall DLL that the ODBC driver will use.
For example a network value of "DBMSSOCN" will use "DBMSSOCN.DLL" to connect to SQL Server via TCP/IP. A value of "DBNMPNTW" will use "DBNMPNTW.DLL" to connect to SQL Server via Named Pipes.
cConnStrin = "SERVER=123.123.123.123;DRIVER=sql server;" +;
"UID=sa; PWD=; DATABASE=northwind;" +;
"Address=123.123.123.123,1433;" +;
"Network=DBMSSOCN"
nConnHandle = Sqlstringconnect( cConnString )
>>What do you mean that you need "to configure sql server client and register the server alias" ?
>>
>>With a DSN-less connection you shoudn't need to do anything in the workstation to have it connect to the server.
>
>Hi Hector.
>Maybe i did not grasp the concept of DSN-less connection to the full. But i don't use DSN for connecting.
>So far there was the following routine. I install SQL Server client on a workstation, then configure the client for connection to the server (defining network protocol and creating SQL Server ALIAS on the workstation), then install my app with the connection string which contains the ALIAS of the SQL Server.
>App can not connect to the server without naming sql server ALIAS in the connection string.
>Users don't really need sql server client on their workstations.
>The best option is to install a SQL Server ODBC driver and define the workable connection string in such a manner that it would contain only the reference to the driver.
>Kamil.
Hector Correa