Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to connect to my Database stored in remote computer with VB.Net

How to connect to my Database stored in remote computer with VB.Net

Scheduled Pinned Locked Moved Visual Basic
6 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Saleem Tahiri
    wrote on last edited by
    #1

    I have a project I am using it in my local computer , when I tested my Database in a remote SQL server 2005 computer, it is giving error , while i can connect through SQL server installed in my computer to that SQL server instance and I can work on those Database I can not connect through VB.Net the code writen is as bellow it says to enable the TCP/pipe while both of them are enabled in remote computer. con = New SqlConnection(" data source =\\servername\instancename; database = Employee;" & "uid=test; pwd=test")

    C J T P J 5 Replies Last reply
    0
    • S Saleem Tahiri

      I have a project I am using it in my local computer , when I tested my Database in a remote SQL server 2005 computer, it is giving error , while i can connect through SQL server installed in my computer to that SQL server instance and I can work on those Database I can not connect through VB.Net the code writen is as bellow it says to enable the TCP/pipe while both of them are enabled in remote computer. con = New SqlConnection(" data source =\\servername\instancename; database = Employee;" & "uid=test; pwd=test")

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If you have the servername right, then it's a network issue, or a configuration issue on SQL Server.

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      1 Reply Last reply
      0
      • S Saleem Tahiri

        I have a project I am using it in my local computer , when I tested my Database in a remote SQL server 2005 computer, it is giving error , while i can connect through SQL server installed in my computer to that SQL server instance and I can work on those Database I can not connect through VB.Net the code writen is as bellow it says to enable the TCP/pipe while both of them are enabled in remote computer. con = New SqlConnection(" data source =\\servername\instancename; database = Employee;" & "uid=test; pwd=test")

        J Offline
        J Offline
        Jay Royall
        wrote on last edited by
        #3

        I am just a beginner so I could well be wrong here but I thought that; unless the remote server is on the same domain as the local machine then you are unable to connect to it by using a UNC? (i.e. \\servername) Is this incorrect? Have you tried connecting to it by using its IP address?

        1 Reply Last reply
        0
        • S Saleem Tahiri

          I have a project I am using it in my local computer , when I tested my Database in a remote SQL server 2005 computer, it is giving error , while i can connect through SQL server installed in my computer to that SQL server instance and I can work on those Database I can not connect through VB.Net the code writen is as bellow it says to enable the TCP/pipe while both of them are enabled in remote computer. con = New SqlConnection(" data source =\\servername\instancename; database = Employee;" & "uid=test; pwd=test")

          T Offline
          T Offline
          Tom Deketelaere
          wrote on last edited by
          #4

          http://www.connectionstrings.com[^] Check your connection string

          1 Reply Last reply
          0
          • S Saleem Tahiri

            I have a project I am using it in my local computer , when I tested my Database in a remote SQL server 2005 computer, it is giving error , while i can connect through SQL server installed in my computer to that SQL server instance and I can work on those Database I can not connect through VB.Net the code writen is as bellow it says to enable the TCP/pipe while both of them are enabled in remote computer. con = New SqlConnection(" data source =\\servername\instancename; database = Employee;" & "uid=test; pwd=test")

            P Offline
            P Offline
            pdnet
            wrote on last edited by
            #5

            Try Using This data source=ServerName ;initial catalog=DatabaseName;persist security info=False;user id=DBUserName ;password=DBPassWord;Connection Timeout=600;

            Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)

            1 Reply Last reply
            0
            • S Saleem Tahiri

              I have a project I am using it in my local computer , when I tested my Database in a remote SQL server 2005 computer, it is giving error , while i can connect through SQL server installed in my computer to that SQL server instance and I can work on those Database I can not connect through VB.Net the code writen is as bellow it says to enable the TCP/pipe while both of them are enabled in remote computer. con = New SqlConnection(" data source =\\servername\instancename; database = Employee;" & "uid=test; pwd=test")

              J Offline
              J Offline
              Jon_Boy
              wrote on last edited by
              #6

              Ensure you have the SQL server configured properly, user/group permissions, and check the *firewall* on the server and client.

              Any suggestions, ideas, or 'constructive criticism' are always welcome. "There's no such thing as a stupid question, only stupid people." - Mr. Garrison

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups