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. C#
  4. Connecting from Visual Studio 2010 to SQL Server Management Studio

Connecting from Visual Studio 2010 to SQL Server Management Studio

Scheduled Pinned Locked Moved C#
visual-studiocsharpdatabasesql-serversysadmin
7 Posts 4 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.
  • D Offline
    D Offline
    Darrall
    wrote on last edited by
    #1

    I have created tables in SQL Server Management Studio which I want to use in a program I have in VS 2010. When you check the properties of the tables in Management Studio there doesn't appear to be an actual path that you can use as a connection string. Can anybody help me with this? Thanks Darrall

    N 1 Reply Last reply
    0
    • D Darrall

      I have created tables in SQL Server Management Studio which I want to use in a program I have in VS 2010. When you check the properties of the tables in Management Studio there doesn't appear to be an actual path that you can use as a connection string. Can anybody help me with this? Thanks Darrall

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

      http://www.connectionstrings.com/[^] You already have SSMS open and connected to a database and you can't figure out a connection string to use? :rolleyes:


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

      D 1 Reply Last reply
      0
      • N Not Active

        http://www.connectionstrings.com/[^] You already have SSMS open and connected to a database and you can't figure out a connection string to use? :rolleyes:


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

        D Offline
        D Offline
        Darrall
        wrote on last edited by
        #3

        A fair enough observation except that it doesn't want the path to the database itself...it wants the path to the file that I created within the database and that path I can't find.

        N P D 3 Replies Last reply
        0
        • D Darrall

          A fair enough observation except that it doesn't want the path to the database itself...it wants the path to the file that I created within the database and that path I can't find.

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

          Darrall wrote:

          the path to the file that I created within the database

          I have no idea what you're talking about


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

          1 Reply Last reply
          0
          • D Darrall

            A fair enough observation except that it doesn't want the path to the database itself...it wants the path to the file that I created within the database and that path I can't find.

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

            I find that hard to believe. Are you sure it's not Access?

            1 Reply Last reply
            0
            • D Darrall

              A fair enough observation except that it doesn't want the path to the database itself...it wants the path to the file that I created within the database and that path I can't find.

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              For an SQL Server connection string, you specify the database name, not the path to the database file. The sole exception to that would be if you were using SQL Server Express.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008
              But no longer in 2009...

              D 1 Reply Last reply
              0
              • D Dave Kreskowiak

                For an SQL Server connection string, you specify the database name, not the path to the database file. The sole exception to that would be if you were using SQL Server Express.

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007, 2008
                But no longer in 2009...

                D Offline
                D Offline
                Darrall
                wrote on last edited by
                #7

                Thanks Dave. This is the sole exception. I am using SQL Server Express 2008.

                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