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. Database & SysAdmin
  3. Database
  4. SQL Express 2005 - Visual Studio 2008

SQL Express 2005 - Visual Studio 2008

Scheduled Pinned Locked Moved Database
helpdatabasecsharpsql-servervisual-studio
12 Posts 2 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.
  • W Wendelius

    Hi, Never seen this, but few questions: - is SQL Browser running - can you connect using Server Explorer Mika

    E Offline
    E Offline
    Ed Poore
    wrote on last edited by
    #3

    Mika Wendelius wrote:

    is SQL Browser running

    Yes

    Mika Wendelius wrote:

    can you connect using Server Explorer

    If it's not a user instance then yes.  I.e. if I set it up in SQL Management Studio and connect like a "full" server then everything works.

    W 1 Reply Last reply
    0
    • E Ed Poore

      Mika Wendelius wrote:

      is SQL Browser running

      Yes

      Mika Wendelius wrote:

      can you connect using Server Explorer

      If it's not a user instance then yes.  I.e. if I set it up in SQL Management Studio and connect like a "full" server then everything works.

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #4

      Okay, by Server Explorer I actually meant Visual Studio Server Explorer. I would believe that the problem is in user instance behaviour. Since it does not use the default port (1433) and the instance name usually must be specified, there's a problem in acquiring this info in VS. Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that. I'll try to install named instance and test this but it will take some time. Meanwhile could you test that if you have an active connection in VS Server Explorer, is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion) Mika

      E 2 Replies Last reply
      0
      • W Wendelius

        Okay, by Server Explorer I actually meant Visual Studio Server Explorer. I would believe that the problem is in user instance behaviour. Since it does not use the default port (1433) and the instance name usually must be specified, there's a problem in acquiring this info in VS. Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that. I'll try to install named instance and test this but it will take some time. Meanwhile could you test that if you have an active connection in VS Server Explorer, is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion) Mika

        E Offline
        E Offline
        Ed Poore
        wrote on last edited by
        #5

        Mika Wendelius wrote:

        Okay, by Server Explorer I actually meant Visual Studio Server Explorer.

        This is exactly the same message regardless of anything inside Visual Studio.  My guess is that although I'm running the x64 edition of SQL Server it's only got the "bindings" for an x86 version.

        Mika Wendelius wrote:

        Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that.

        Done that.

        Mika Wendelius wrote:

        Meanwhile could you test that if you have an active connection in VS Server Explorer

        I have an active connection in Server Explorer to the "proper" SQL database.  If I detach that database and then point Server Explorer at the database file rather than the connection then the same message pops up.

        Mika Wendelius wrote:

        is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion

        You can and I think the method is the same whether you create it through Server Explorer or Add New Item.  Add New Item will automatically add a connection to the database to Server Explorer. One thing I haven't tried recently is installing the x86 version of SQL Server (I can uninstall or reinstall SQL quite happily but don't particularly fancy uninstalling VS2008).

        Mika Wendelius wrote:

        I'll try to install named instance and test this but it will take some time

        I've got a trial install of Vista x64 Ultimate inside a VMWare virtual machine if you'd like a copy for testing (will take quite a while since even compressed as hard as it'll go it's over 4GB).

        1 Reply Last reply
        0
        • W Wendelius

          Okay, by Server Explorer I actually meant Visual Studio Server Explorer. I would believe that the problem is in user instance behaviour. Since it does not use the default port (1433) and the instance name usually must be specified, there's a problem in acquiring this info in VS. Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that. I'll try to install named instance and test this but it will take some time. Meanwhile could you test that if you have an active connection in VS Server Explorer, is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion) Mika

          E Offline
          E Offline
          Ed Poore
          wrote on last edited by
          #6

          Mika Wendelius wrote:

          Okay, by Server Explorer I actually meant Visual Studio Server Explorer.

          This is exactly the same message regardless of anything inside Visual Studio.  My guess is that although I'm running the x64 edition of SQL Server it's only got the "bindings" for an x86 version.

          Mika Wendelius wrote:

          Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that.

          Done that.

          Mika Wendelius wrote:

          Meanwhile could you test that if you have an active connection in VS Server Explorer

          I have an active connection in Server Explorer to the "proper" SQL database.  If I detach that database and then point Server Explorer at the database file rather than the connection then the same message pops up.

          Mika Wendelius wrote:

          is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion

          You can and I think the method is the same whether you create it through Server Explorer or Add New Item.  Add New Item will automatically add a connection to the database to Server Explorer. One thing I haven't tried recently is installing the x86 version of SQL Server (I can uninstall or reinstall SQL quite happily but don't particularly fancy uninstalling VS2008).

          Mika Wendelius wrote:

          I'll try to install named instance and test this but it will take some time

          I've got a trial install of Vista x64 Ultimate inside a VMWare virtual machine if you'd like a copy for testing (will take quite a while since even compressed as hard as it'll go it's over 4GB). [edit] In the meantime I've set up an XP virtual machine to use for all this work anyway and it feels "fun" to go back to such a retro OS (although I have installed an add-on which gives me the Vista Start Menu). It'd just be nice to have this thing up and running on an x64 machine since everything else works perfectly.  Maybe it's time for a re-install :-). [/edit]

          W 2 Replies Last reply
          0
          • E Ed Poore

            Mika Wendelius wrote:

            Okay, by Server Explorer I actually meant Visual Studio Server Explorer.

            This is exactly the same message regardless of anything inside Visual Studio.  My guess is that although I'm running the x64 edition of SQL Server it's only got the "bindings" for an x86 version.

            Mika Wendelius wrote:

            Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that.

            Done that.

            Mika Wendelius wrote:

            Meanwhile could you test that if you have an active connection in VS Server Explorer

            I have an active connection in Server Explorer to the "proper" SQL database.  If I detach that database and then point Server Explorer at the database file rather than the connection then the same message pops up.

            Mika Wendelius wrote:

            is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion

            You can and I think the method is the same whether you create it through Server Explorer or Add New Item.  Add New Item will automatically add a connection to the database to Server Explorer. One thing I haven't tried recently is installing the x86 version of SQL Server (I can uninstall or reinstall SQL quite happily but don't particularly fancy uninstalling VS2008).

            Mika Wendelius wrote:

            I'll try to install named instance and test this but it will take some time

            I've got a trial install of Vista x64 Ultimate inside a VMWare virtual machine if you'd like a copy for testing (will take quite a while since even compressed as hard as it'll go it's over 4GB). [edit] In the meantime I've set up an XP virtual machine to use for all this work anyway and it feels "fun" to go back to such a retro OS (although I have installed an add-on which gives me the Vista Start Menu). It'd just be nice to have this thing up and running on an x64 machine since everything else works perfectly.  Maybe it's time for a re-install :-). [/edit]

            W Offline
            W Offline
            Wendelius
            wrote on last edited by
            #7

            Hi again, I installed another instance (with such an original name as Test :)) After that I tried to add a new item and then in the dialog box from data node "Service-based Database". This failed with an error mesagge saying that the conection cannot be established because the server cannot be found. This is quite obvious since there's no dialog box asking where do I want to connect and the second instance is not listening on default ports and so on. What I'm currently wondering is that the error I get is different from yours. Am I doing this differently? Mika

            1 Reply Last reply
            0
            • E Ed Poore

              Mika Wendelius wrote:

              Okay, by Server Explorer I actually meant Visual Studio Server Explorer.

              This is exactly the same message regardless of anything inside Visual Studio.  My guess is that although I'm running the x64 edition of SQL Server it's only got the "bindings" for an x86 version.

              Mika Wendelius wrote:

              Also if I remember correctly, user instances must be explicitely allowed during installation but in this case I believe you have done that.

              Done that.

              Mika Wendelius wrote:

              Meanwhile could you test that if you have an active connection in VS Server Explorer

              I have an active connection in Server Explorer to the "proper" SQL database.  If I detach that database and then point Server Explorer at the database file rather than the connection then the same message pops up.

              Mika Wendelius wrote:

              is the behaviour different or can you create the database to VS project from Server Explorer (never used server explorer this way so it may be a dumb suggestion

              You can and I think the method is the same whether you create it through Server Explorer or Add New Item.  Add New Item will automatically add a connection to the database to Server Explorer. One thing I haven't tried recently is installing the x86 version of SQL Server (I can uninstall or reinstall SQL quite happily but don't particularly fancy uninstalling VS2008).

              Mika Wendelius wrote:

              I'll try to install named instance and test this but it will take some time

              I've got a trial install of Vista x64 Ultimate inside a VMWare virtual machine if you'd like a copy for testing (will take quite a while since even compressed as hard as it'll go it's over 4GB). [edit] In the meantime I've set up an XP virtual machine to use for all this work anyway and it feels "fun" to go back to such a retro OS (although I have installed an add-on which gives me the Vista Start Menu). It'd just be nice to have this thing up and running on an x64 machine since everything else works perfectly.  Maybe it's time for a re-install :-). [/edit]

              W Offline
              W Offline
              Wendelius
              wrote on last edited by
              #8

              I did some tests on the service-based database. When adding it to the project it actually starts SQL Server in desktop session. So the database is not added to service controlled sql server at that time. This didn't make any sense since one of the startup parameters is instance name. How can Visual Studio start the instance without knowing relevant parameters:confused:. Then I found this: http://msdn.microsoft.com/en-us/library/ms345154.aspx#sseover_topic18[^]

              Visual Studio Integration SQL Server Express is installed with all editions of Visual Studio. Visual Studio installs SQL Server Express using the instance name SQLEXPRESS. In SQL Server Express, the applications rely on the SQLEXPRESS instance name. The goal of Visual Studio and SQL Server Express integration is to make database access with SQL Server Express as simple and easy as working with Jet. This is true not only for client applications but also for ASP.NET Web server scenarios.

              This makes me wonder if there actually is any way to use non-default instances with Visual Studio... Mika

              E 2 Replies Last reply
              0
              • W Wendelius

                I did some tests on the service-based database. When adding it to the project it actually starts SQL Server in desktop session. So the database is not added to service controlled sql server at that time. This didn't make any sense since one of the startup parameters is instance name. How can Visual Studio start the instance without knowing relevant parameters:confused:. Then I found this: http://msdn.microsoft.com/en-us/library/ms345154.aspx#sseover_topic18[^]

                Visual Studio Integration SQL Server Express is installed with all editions of Visual Studio. Visual Studio installs SQL Server Express using the instance name SQLEXPRESS. In SQL Server Express, the applications rely on the SQLEXPRESS instance name. The goal of Visual Studio and SQL Server Express integration is to make database access with SQL Server Express as simple and easy as working with Jet. This is true not only for client applications but also for ASP.NET Web server scenarios.

                This makes me wonder if there actually is any way to use non-default instances with Visual Studio... Mika

                E Offline
                E Offline
                Ed Poore
                wrote on last edited by
                #9

                Hmm, I'll try installing an instance named SQLExpress and see what happens.  With regards to the error message it's a different one I think, it simply refuses to try and connect. BTW, thanks for all the help that you're providing me with :beer:

                1 Reply Last reply
                0
                • W Wendelius

                  I did some tests on the service-based database. When adding it to the project it actually starts SQL Server in desktop session. So the database is not added to service controlled sql server at that time. This didn't make any sense since one of the startup parameters is instance name. How can Visual Studio start the instance without knowing relevant parameters:confused:. Then I found this: http://msdn.microsoft.com/en-us/library/ms345154.aspx#sseover_topic18[^]

                  Visual Studio Integration SQL Server Express is installed with all editions of Visual Studio. Visual Studio installs SQL Server Express using the instance name SQLEXPRESS. In SQL Server Express, the applications rely on the SQLEXPRESS instance name. The goal of Visual Studio and SQL Server Express integration is to make database access with SQL Server Express as simple and easy as working with Jet. This is true not only for client applications but also for ASP.NET Web server scenarios.

                  This makes me wonder if there actually is any way to use non-default instances with Visual Studio... Mika

                  E Offline
                  E Offline
                  Ed Poore
                  wrote on last edited by
                  #10

                  Renaming the instance to SQLExpress fixes it.  What a situation! Thanks for your help and the research, I definitely owe you a :beer:

                  W 1 Reply Last reply
                  0
                  • E Ed Poore

                    Renaming the instance to SQLExpress fixes it.  What a situation! Thanks for your help and the research, I definitely owe you a :beer:

                    W Offline
                    W Offline
                    Wendelius
                    wrote on last edited by
                    #11

                    You're welcome :) In the meantime I investigated the templates for new items under Visual Studio ItemTemplates, but I didn't find any way to define a new template against another instance name nor to change the default name of the instance to connect to. Seems that they have hardcoded this into VS. Nice... :omg: Mika

                    E 1 Reply Last reply
                    0
                    • W Wendelius

                      You're welcome :) In the meantime I investigated the templates for new items under Visual Studio ItemTemplates, but I didn't find any way to define a new template against another instance name nor to change the default name of the instance to connect to. Seems that they have hardcoded this into VS. Nice... :omg: Mika

                      E Offline
                      E Offline
                      Ed Poore
                      wrote on last edited by
                      #12

                      Mika Wendelius wrote:

                      Seems that they have hardcoded this into VS. Nice... :omg:

                      Perhaps it's because only the express edition supports user instances?  Maybe they just haven't got around to refactoring it out :rolleyes:

                      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