none
Windows 7 RTM 64 & Visual Studio 2008 SP1 & SQL Server 2008 SP1

    Question

  • I am trying to  use Visual Studio to create a SQL 2008 database in a project, rather than use SSMS, and I get a message box that "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function Properly." I did not install SQL Express 2005 with the VS install, because I installed SQL Express 2008 (64 bit). Both SQL Express and VS have their respective SP1s installed, these are both running on Win 7 64 RTM. A Microsoft web page indicated that creating a SQL .mdf from within VS should work as long as VS SP1 is installed, but it isn't working for me. The Tools ->Options ->Database Tools ->Data Connections is set to the named instance of SQL Express.

    1. Does anyone know if this combination works, or what it takes to  get it to work?
    2. Does SQL Express need to be installed with VS to install any hooks from VS into SQL, or some such? (I did not bother with Installing SQL 2005 with VS 2008 since I knew I would be installing SQL 2008).

    Steve
    Saturday, October 03, 2009 2:16 AM

Answers

All replies

  • This is getting frustrating.

    As mentioned above my OS is Win7 64 RTM. Visual Studio is 2008 with SP1. I had both SQL Server 2008 Developer and SQL Server 2008 Express installed, with SQL Server 2008 SP1, as directed twice during each install of SQL Server; also during the each install I would recieve the "Invoke of BeginInvoke cannot be called on a control until the window handle has been created .." clicking OK on this dialog then requires restarting the install which will work the second time for each install (apparently the object is instantiated and not cleared when the install is shut down so able to then be used during the second install attempt (?)).

    I uninstalled all SQL 2008 components and started from scratch only installing SQL Express 2008.

    So, SQL 2008 Express is installed on the machine, but will not allow mdf creation from within VS 2008. I found a thread on these forums indicating there is a specific SQL Express SP1 that is different from the 'standard' SQL SP1 mentioned in the dialog when first installing SQL Express on Win 7. Downloading the sQL Express SP1 and attempting to install it the instillation halts midway through the actual installation step (step 8) with the "Invoke or BeginInvoke cannot ...." message. Clicking OK terminates the SP1 install so I try for a second attempt, assuming it will work like the other attempts, only now the the installation halts at the Feature Selection step (step 3) of the install because no selection changes are made, nor none can be made since I did a Select All on the first pass.

    To try a different tack I installed the Web Platform Installer to see if it would offer a different method, but it reports that SQL Express is at SP1 so nothing needs to be done. Firing up VS and attempting to create a database yields the now dreaded dialog that SQL 2005 is needed.

    Will the Win7 64 RTM, VS2008 and SQl Server Express combination really work? Has anyone successfully gotten them to play nice together? What are the magic steps needed to make it happen?

    Has anyone run into these problems?


    Steve
    Saturday, October 03, 2009 8:33 PM
  • Hello Steve,

    I think you might ran into a problem that has been described here: FIX: Error message when you connect to a 64-bit instance of SQL Server Express 2008 by using Visual Studio 2008 Service Pack 1 (SP1): "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly"

    Please try this link to request for the fix.

    Please let me know how it goes.

    Regards,
    Jie
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg[at]microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    If you have any feedback, please tell us.

    The CodeFx Project
    My Blog (in Simplified Chinese)
    Monday, October 05, 2009 8:59 AM
  • Jie,

    Thanks for that link to the KB, and especially the request link. As soon as I get the hotfix I'll post if it solved the problem.


    Steve
    Monday, October 05, 2009 6:10 PM
  • Jie,

    Thanks for that link to the KB, and especially the request link. As soon as I get the hotfix I'll post if it solved the problem.


    Steve

    Hi Steve,

    Is the hotfix working for you?

    Thanks,
    Jie
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg[at]microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    If you have any feedback, please tell us.

    The CodeFx Project
    My Blog (in Simplified Chinese)
    Wednesday, October 14, 2009 2:56 AM
  • Hi Jie,

    Actually the Hotfix did not work on my laptop where I've was doing all the installs and removals of SQL Server. I've built up a clean environment with my desktop and after the OS I installed SQL Express 2008 (en_sql_server_2008_express_with_advanced_services_x64.exe) and then tried to install the SP1 (en_sql_server_2008_express_sp1_x64.exe), which failed with an error I hadn't seen before (don't remember), although the install completed, with errors (there were two, one was about registry entries and the second I don't remember). I haven't tried the Hotfix to this machine and am going to uninstall the x64 version of SQL Express and go back to the x86 version until such time that MS gets the Win7 64 and SQL 64 compatibility issues resolved.


    Steve
    Friday, October 16, 2009 6:38 PM
  • Hi Steve,

    Were you still getting the same error message "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function Properly." after applying the hotfix?

    And what compatibility issues did you get when installing SQL Server 2008 Express? If you saw the compatibility warning dialog, just ignore it and run the setup. After finishing the setup, apply SQL Server 2008 SP1 and it should work normally.

    Regards,
    Jie
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    If you have any feedback, please tell us.

    The CodeFx Project
    My Blog (in Simplified Chinese)
    Monday, October 19, 2009 10:25 AM
  • Hi Jie,

    After applying the Hotfix on my notebook I was still getting the message in Visual Studio that I needed SQL Express 2005. I dropped down from the x64 version to the x86 version and the problem went away.

    In building up my desktop system I finally realized that the en_sql_server_2008_express_sp1_x64.exe, or en_sql_server_2008_express_sp1_x86.exe should not be part of my, or most other's, installation procedure if they want any of the Advanced Services for SQl; and instead should be using SQLServer2008SP1-KB968369-x..-ENU.exe to get to SQL 2008 SP1.

    I may be dense, but Microsoft could do a much better job of naming and explaining the SQL installs, patches and directions of how to go from where the user install is to where they want/need to be to have the most current set of files. When I see a file named en_sql_server_2008_express_sp1_x.. I expect it to be an SP that will take my current SQL Express to the SP1 level, not be a full install of the engine WITH the SP. I spent several iterations of trying to use en_sql_server_2008_express_sp1_x.. after installing en_sql_server_2008_express_with_advanced_services_x.. (both 64 & 86). Better naming and clearer descriptions about the files would have gone along way to avoid wasting time going down wrong paths.

    Steve
    Monday, October 19, 2009 4:14 PM
  • Steve,

    I totally understand your points. There are too much packages and they are sometimes confusing.

    Yesterday I tried to setup the VS2008 SP1 + SQL Server Express 2008 (x64) + SP1 configuration on a clean Windows 7 x64 machine. And I found that Windows Update might be the most smooth way to get the right package applied - after installing the original SQL Server Express 2008 (x64), the Windows Update will download and install SP1 for it. Then everything just works as expected.

    If you're running Windows Vista/7, just enable Microsoft Update in the Windows Update control panel; if you're running on Windows XP, go to http://update.microsoft.com and enable it. That should make things easier.

    Another way to install the right package is to use the Web Platform Installer, which is used by the SQL Server Express 2008 download page now.

    Regards,
    Jie
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    If you have any feedback, please tell us.

    The CodeFx Project
    My Blog (in Simplified Chinese)
    Tuesday, October 20, 2009 1:10 PM
  • Jie,

    I just wanted to let you know that the Hotfix that you posted above corrected this issue for me.

    I just installed Visual Web Developer Express 2008 w/the included SQL Server Express 2008 using the Microsoft Web Installer earlier today.  After attempting to set up a web site following a tutorial and running into the "Connections to SQL Server files (*mdf) require SQL Server Express 2005 to function properly" error, I started looking through the threads on here to try to locate a solution.  After several failed attempts, which included verifying the Instance Name and that the SQL Server was running properly, I finally stumbled upon your solution.

    I am running Windows 7 Ultimate RC1 x64.  The web installer installed VWDE 2008 SP1 and SSE2008 SP1, and I saw while going through all the other checks that it was the x64 version of the SQL Server.

    After downloading and installing the Hotfix that you posted above, I loaded VWDE and added a SQL Database via the Solution Explorer, and it worked like a charm.

    Thanks

    Bob

    Friday, November 13, 2009 6:49 AM
  • Bob,

    Thank you for the confirmation.

    Regards,
    Jie


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    If you have any feedback, please tell us.

    The CodeFx Project
    My Blog (in Simplified Chinese)
    Tuesday, November 17, 2009 2:48 AM
  • I am experiencing the same issue. I have done all updates through web installer and windows updates.

    Win 7 pro 64 bit RTM
    Visual studio 2008 sp1
    SQL server 2008 64 bit express sp1

    I can create a database through the SQL management studio however I cannot access any databases or create any through Visual Studio.

    I have the same setup as above on a Win 7 64-bit RC1 machine except looking I see that I have the 32-bit version of SQL Server 2008 running and everything works fine. Possibly some issue with Visual Studio trying to connect to a 64-bit version of SQL Server? Using an existing website - when I try to connect to the database I get an error like: User cannot login. When I create a new website and try to create a database or Visual Studio trys to create the default database I get the error mentioned in ss86's original post.

    Any suggestions please?

    tvm

    Thursday, December 03, 2009 4:28 PM
  • Jie, I am having the issue and the Hotfix did not fix the issue for me.

    I am running Windows 7 Ultimate 64 bit (this is a new install about two weeks old).

    I installed the WPI which chose to install:
        Visual Web Developer 2008 Express 64 bit SP1
        SQL Server 2008 Express 64 bit
       
     Microsoft Update installed SP1 for SQL Server 2008
       
    After searching the web for hours I finally stumbled across the article you mentioned above Article ID: 957944 which sounded like my issue. I then searched for a while longer until I found your link for the Hotfix, unfortunately it did not solve my issue.

    I am using the Database Explorer in VSWD to browse the database but when I click on the" Add New Item" button and select "SQL Server Database" I get the below error message.

    ---------------------------
    Visual Web Developer 2008 Express Edition
    ---------------------------
    Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL:  http://go.microsoft.com/fwlink/?LinkId=49251
    ---------------------------

    I will definitely post if I fix or find a workaround as this has already taken quite an investment of time.
    Wednesday, December 23, 2009 8:20 PM