Nov 8th, 2000, 01:47 PM
OK. Hopefully someone can save me from pulling all my remaining hairs out.
I have written a database application that connects to a SQL Server database on a remote machine through a dial-up connection. I need to use TCP/IP connectivity (as opposed to named pipes) to connect to the database. My application uses a DSNless connection to the database. It is my understanding that DSNless connections use named pipes by default. I need to be able to force the DSNless connection to use TCP/IP through the code itself.
What I am seeing now is, when I install the application and attempt to run it, it cannot access the database. However, if I create an ODBC data source, force the connection to use TCP/IP (through client configuration), test the connection successfully, and then delete the data source, my application then connects fine. Make sense? It seems that somewhere it forces the connection over TCP/IP instead of named pipes after I have made the connection manually once.
Does this make sense? My application is working fine, it's just wierd that I have to create a DSN connection and then delete it before I can use the DSNless connection through code.
Any ideas?
Thanks!!!
Dan
I have written a database application that connects to a SQL Server database on a remote machine through a dial-up connection. I need to use TCP/IP connectivity (as opposed to named pipes) to connect to the database. My application uses a DSNless connection to the database. It is my understanding that DSNless connections use named pipes by default. I need to be able to force the DSNless connection to use TCP/IP through the code itself.
What I am seeing now is, when I install the application and attempt to run it, it cannot access the database. However, if I create an ODBC data source, force the connection to use TCP/IP (through client configuration), test the connection successfully, and then delete the data source, my application then connects fine. Make sense? It seems that somewhere it forces the connection over TCP/IP instead of named pipes after I have made the connection manually once.
Does this make sense? My application is working fine, it's just wierd that I have to create a DSN connection and then delete it before I can use the DSNless connection through code.
Any ideas?
Thanks!!!
Dan