>>First thing I would check is if the ODBC driver that is mentioned in the connection string is installed on the second PC.
>>
>
>Thanks, I'll double check that, but it doesn't explain why I would be able to connect using the ODBC Administration utility.
>
>That has made me think though and this is the connection string I use:
>
>Data Source=XXXXXXXXXXXXX; Initial Catalog=BPOptical; Integrated Security=false; User Id=xxxxxx; Password= xxxxxxxxx
>
>Which does not specify a driver, so maybe the PC that is not working is picking up a different ODBC driver than the other one because I did not specify the correct one?
>
>Does that make sense?
>
>Should I add in a Driver=My Driver to my connection string?
I can't say for sure what is better, but the connection string I do mention the driver:
lnConnectionHandle = SQLSTRINGCONNECT("DRIVER=SQL Server Native Client 10.0; " + ;
"server=127.0.0.1\InstanceName;" + ;
"UID=sa; " + ;
"PWD=" + tcPassword)
On the clients I install the sqlncli.msi or sqlncli_x64.msi driver. Also check in Control Panel > Administrative tools > Data Sources (ODBC) in the drivers tab which drivers you have actually installed.
And you may test this while switching the Firewall off at the client.
Christian Isberner
Software Consultant