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. How to get the "DataSource" in the Connection String ?

How to get the "DataSource" in the Connection String ?

Scheduled Pinned Locked Moved ASP.NET
databasesysadmintutorialquestion
7 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
    Subin Alex
    wrote on last edited by
    #1

    I am creating a web app. with sqlserver 2000 and if i host this app,how to get the "DataSource" in the Connection String which i use the web.config file for the DB Connection? Most of my friends use the ip address of the web server,is it a gud practise or there is any other way?

    N D C K A 5 Replies Last reply
    0
    • S Subin Alex

      I am creating a web app. with sqlserver 2000 and if i host this app,how to get the "DataSource" in the Connection String which i use the web.config file for the DB Connection? Most of my friends use the ip address of the web server,is it a gud practise or there is any other way?

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Why you need a DataSource in connection string? See http://www.connectionstrings.com/[^]

      Navaneeth How to use google | Ask smart questions

      1 Reply Last reply
      0
      • S Subin Alex

        I am creating a web app. with sqlserver 2000 and if i host this app,how to get the "DataSource" in the Connection String which i use the web.config file for the DB Connection? Most of my friends use the ip address of the web server,is it a gud practise or there is any other way?

        D Offline
        D Offline
        Dev S
        wrote on last edited by
        #3

        Yes ip address or DataSource name given by your Service Provider is written in web.config and the "Key" will be used inyour code to call that connection string. eg. add key="xyz" value="server=209.xxx.xxx.xxx;user id=xyz;password=xyz;database=xyz"

        1 Reply Last reply
        0
        • S Subin Alex

          I am creating a web app. with sqlserver 2000 and if i host this app,how to get the "DataSource" in the Connection String which i use the web.config file for the DB Connection? Most of my friends use the ip address of the web server,is it a gud practise or there is any other way?

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

          IP address is fine, if you use a name, it needs to be resolved anyhow.

          Christian Graus Driven to the arms of OSX by Vista.

          1 Reply Last reply
          0
          • S Subin Alex

            I am creating a web app. with sqlserver 2000 and if i host this app,how to get the "DataSource" in the Connection String which i use the web.config file for the DB Connection? Most of my friends use the ip address of the web server,is it a gud practise or there is any other way?

            K Offline
            K Offline
            kumar_k508
            wrote on last edited by
            #5

            Hi, You have to give the ip address or server name provided by your service provider in the connection string...,with out this you can not establish the connection to the server

            S 1 Reply Last reply
            0
            • S Subin Alex

              I am creating a web app. with sqlserver 2000 and if i host this app,how to get the "DataSource" in the Connection String which i use the web.config file for the DB Connection? Most of my friends use the ip address of the web server,is it a gud practise or there is any other way?

              A Offline
              A Offline
              Abhijit Jana
              wrote on last edited by
              #6

              Subin Alex wrote:

              Most of my friends use the ip address of the web server,is it a gud practise or there is any other way?

              This is depends where you DB server is. Your friend use IP Address of Web server as DB server, because of they have hosted Database and Web Sites in a Same System.

              Subin Alex wrote:

              is it a gud practise or there is any other way?

              It depends on requirements and application. If its very small application then its fine. for large organization they always keeps it different.

              cheers, Abhijit CodeProject MVP

              1 Reply Last reply
              0
              • K kumar_k508

                Hi, You have to give the ip address or server name provided by your service provider in the connection string...,with out this you can not establish the connection to the server

                S Offline
                S Offline
                Subin Alex
                wrote on last edited by
                #7

                thanx!

                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