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. Web Development
  3. ASP.NET
  4. Connecting to Database

Connecting to Database

Scheduled Pinned Locked Moved ASP.NET
databasesysadminsql-server
9 Posts 5 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.
  • V Offline
    V Offline
    vijaylumar
    wrote on last edited by
    #1

    To connect to database (sql server) im using the following con = New SqlConnection("Network Library =DBMSSOCN; server =ipaddress; database = dvk; user id = sa; password ="";timeout = 60") where ipaddress is the server ipaddress and it is like this 20.0.0.200 but recently my server ip adress is changed and i replaced it in the connectionstring but it is not working it is showing that webserver not found. should i configure the sqlserver with new ipaddress

    N D T 3 Replies Last reply
    0
    • V vijaylumar

      To connect to database (sql server) im using the following con = New SqlConnection("Network Library =DBMSSOCN; server =ipaddress; database = dvk; user id = sa; password ="";timeout = 60") where ipaddress is the server ipaddress and it is like this 20.0.0.200 but recently my server ip adress is changed and i replaced it in the connectionstring but it is not working it is showing that webserver not found. should i configure the sqlserver with new ipaddress

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      You have to make sure the SQL Server is configured properly to allow for remote access.


      I know the language. I've read a book. - _Madmatt

      V 1 Reply Last reply
      0
      • V vijaylumar

        To connect to database (sql server) im using the following con = New SqlConnection("Network Library =DBMSSOCN; server =ipaddress; database = dvk; user id = sa; password ="";timeout = 60") where ipaddress is the server ipaddress and it is like this 20.0.0.200 but recently my server ip adress is changed and i replaced it in the connectionstring but it is not working it is showing that webserver not found. should i configure the sqlserver with new ipaddress

        D Offline
        D Offline
        David Mujica
        wrote on last edited by
        #3

        This is a classic example of why you should not refer to your servers by IP address, if the network guys reconfigure your network, boom ! Your applications break. Let the network guys do their thing, let the developers do theirs. I'm getting off my soapbox now. :rose:

        E V 2 Replies Last reply
        0
        • D David Mujica

          This is a classic example of why you should not refer to your servers by IP address, if the network guys reconfigure your network, boom ! Your applications break. Let the network guys do their thing, let the developers do theirs. I'm getting off my soapbox now. :rose:

          E Offline
          E Offline
          Ennis Ray Lynch Jr
          wrote on last edited by
          #4

          While I agree that server names are better, I have had just as much trouble with Network guys F* up the DNS requiring the use of IP Addresses instead as the more reliable solution. There has been a noticeable increase in lazy sys-admins.

          Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

          1 Reply Last reply
          0
          • V vijaylumar

            To connect to database (sql server) im using the following con = New SqlConnection("Network Library =DBMSSOCN; server =ipaddress; database = dvk; user id = sa; password ="";timeout = 60") where ipaddress is the server ipaddress and it is like this 20.0.0.200 but recently my server ip adress is changed and i replaced it in the connectionstring but it is not working it is showing that webserver not found. should i configure the sqlserver with new ipaddress

            T Offline
            T Offline
            T M Gray
            wrote on last edited by
            #5

            Is it the same server or are you pointing to a new server? If it is a new server make sure it is configured to accept TCP connections and not just named pipes if you are going to specify the network library. Are you sure there are no firewalls in between your web server and SQL server that could be restricting traffic on port 1433? Oh and by the way NEVER EVER EVER EVER use the sa account.

            1 Reply Last reply
            0
            • D David Mujica

              This is a classic example of why you should not refer to your servers by IP address, if the network guys reconfigure your network, boom ! Your applications break. Let the network guys do their thing, let the developers do theirs. I'm getting off my soapbox now. :rose:

              V Offline
              V Offline
              vijaylumar
              wrote on last edited by
              #6

              as u said,i given the server name instead of ipaddress like this con = New SqlConnection("Network Library =DBMSSOCN; server =server1ABN; database = dvk; user id = sa; password ="";timeout = 60") but i get this error A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.) all configurations are enabled to Sqlserver. only a ipadress of the server is changed. if ipadress of the server is changed then do we have to reconfigure the sqlserver with new ipadress from the past 1 week the website is running properly now the same server is configured with a new ipaddress This problem occurred with the changing of ipaddress can u help me

              1 Reply Last reply
              0
              • N Not Active

                You have to make sure the SQL Server is configured properly to allow for remote access.


                I know the language. I've read a book. - _Madmatt

                V Offline
                V Offline
                vijaylumar
                wrote on last edited by
                #7

                im using SQLSERVER 2000 and it is configured to allow remote access till now i gone through connecting server using ip address can u tell me ,what settings to be made to server for connecting it through server name. my server name is BDPLServer1 and i have a small doubt regarding this if any one trying with the same server name and accessing my database is it possible

                N 1 Reply Last reply
                0
                • V vijaylumar

                  im using SQLSERVER 2000 and it is configured to allow remote access till now i gone through connecting server using ip address can u tell me ,what settings to be made to server for connecting it through server name. my server name is BDPLServer1 and i have a small doubt regarding this if any one trying with the same server name and accessing my database is it possible

                  N Offline
                  N Offline
                  Not Active
                  wrote on last edited by
                  #8

                  If you can connect via the IP address but not using the DNS name, then it would seem to indicate you have an issue with you machine not being able to resolve the DNS. Contact your network people.


                  I know the language. I've read a book. - _Madmatt

                  V 1 Reply Last reply
                  0
                  • N Not Active

                    If you can connect via the IP address but not using the DNS name, then it would seem to indicate you have an issue with you machine not being able to resolve the DNS. Contact your network people.


                    I know the language. I've read a book. - _Madmatt

                    V Offline
                    V Offline
                    vijaylumar
                    wrote on last edited by
                    #9

                    i can access the sqlserver using the server name in my local system in my system there is no sqlserver installed and when i upload the page and run it on browser then it does not work.

                    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