How to Detect SQL Server version on target machine with installer? RRS feed

  • Question

  • User-28526246 posted

    I've created an ASP.NET MVC 3 application that uses the ASP.NET Membership database and a SQL CE database embedded in the project. The database on the source machine is SQL Server 2008 SP1 R2 - version 661.

    The installation process works ok, but when I install it on a computer that has SQL Server 2008 or earlier the login process doesn't work since the database versions are different.

    Is there a way to plug into the installer a "check" for SQL Server versions and then download and install the correct version when necessary?

    Any help here is appreciated.


    Wednesday, October 26, 2011 8:09 PM

All replies

  • Thursday, October 27, 2011 12:49 AM
  • User-28526246 posted

    @sreejukg, thanks for the link, but it didn't answer my question.  Per the instructions, there was no "Solution Explorer/Database Explorer" in my VS 2010 application and after I copied and pasted the required sqlce*.dll files into my project, I wasn't able to set a refence to them in my project.  It gave me an error.

    Where my published application fails is when it's attempting to connect to the ASPNETDB.mdf database, not the SqlCe database that contains my application data.

    I'm thinking I should rethink this and target SQLExpress.  Is SQL Express automatically installed on every Vista or Windows 7 machine that I would be able to target, or do I need to have some way of installing this also?

    Thanks again.

    Thursday, October 27, 2011 12:50 PM