Results 1 to 6 of 6

Thread: Force DNSLess connection to use TCP/IP

  1. #1
    Guest

    Question

    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


  2. #2
    New Member
    Join Date
    Feb 2001
    Posts
    13

    Exclamation Query

    hi there,
    i can't answer your Qs, but if u can let me know how u made the remote connectivity thru your VB appli ? what exactly is to be done ?

    thanx
    htr

  3. #3
    New Member
    Join Date
    Feb 2001
    Posts
    13

    Exclamation Query

    hi there,
    i can't answer your Qs, but if u can let me know how u made the remote connectivity thru your VB appli ? what exactly is to be done ?

    thanx
    htr

  4. #4
    danshap
    Guest
    There were no special calls made to connect over the internet to the database that I needed. I used standard ADO connections, commands, and recordsets to carry out all the transactions.

    Thanks!!!

    Dan

  5. #5
    Yash_Kumar
    Guest
    Could you give an example, I've been desperately looking for away to connect to a remote database using ado. I found out you do so ba service called Remote Data Services, but I could not quite figure out how to use it. Could you please post an example. And, is it possible to connect to a Microsoft Access database also?

  6. #6
    danshap
    Guest
    The code I used to connect to the remote database is no different than if I were connecting to a database on my local network. I just assume that the internet connection has been established and carry out all my commands as normal.

    The application I created is not exactly robust. It is a small app that I am using to update the database. If something fails (the connection isn't there or gets dropped), I'm not really worried about it.

    If needed, email me directly ([email protected]) and I'll send you some of my code.

    Thanks!!!

    Dan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width