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. i want to select mssql2005 or mssql2008 where 2005, 2008 was instlled.

i want to select mssql2005 or mssql2008 where 2005, 2008 was instlled.

Scheduled Pinned Locked Moved ASP.NET
questiondatabasesql-serversecurity
3 Posts 3 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.
  • B Offline
    B Offline
    buffering83
    wrote on last edited by
    #1

    my computer have ms-sql 2005, 2008. i select web.config like this <add key="dsn" value="data source=localhost;initial catalog=PERSON_database;uid=sa;pwd=1111;persist security info=False;packet size=4096"/> but i only connect mssql2005. how can i connect mssql 2008?

    hi My english is a little. anyway, nice to meet you~~ and give me your advice anytime~

    M L 2 Replies Last reply
    0
    • B buffering83

      my computer have ms-sql 2005, 2008. i select web.config like this <add key="dsn" value="data source=localhost;initial catalog=PERSON_database;uid=sa;pwd=1111;persist security info=False;packet size=4096"/> but i only connect mssql2005. how can i connect mssql 2008?

      hi My english is a little. anyway, nice to meet you~~ and give me your advice anytime~

      M Offline
      M Offline
      m dhu
      wrote on last edited by
      #2

      I think the connection string you mentioned is for database in 2005. Similarly add another connection string pointing to database in sql 2008. :)

      1 Reply Last reply
      0
      • B buffering83

        my computer have ms-sql 2005, 2008. i select web.config like this <add key="dsn" value="data source=localhost;initial catalog=PERSON_database;uid=sa;pwd=1111;persist security info=False;packet size=4096"/> but i only connect mssql2005. how can i connect mssql 2008?

        hi My english is a little. anyway, nice to meet you~~ and give me your advice anytime~

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        It means a SQL 2005 server instance has been installed as the default instance, which enables you to specify localhost as the data source. SQL 2008 server must have been installed as a named instance (since there can be only one default instance). Find out the name of the named instance and use it in your connection string like this.

        data source=localhost\mySql2k8instance

        You can find the name of your SQL 2008 instance by looking at the list of serivces in services.msc.

        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