Add new Item -> SQL Server 2008 Database.mdf

Last post 09-29-2009 2:59 PM by Mr. R. 9 replies.

Sort Posts:

  • Add new Item -> SQL Server 2008 Database.mdf

    09-04-2008, 8:02 AM
    • Participant
      1,983 point Participant
    • webbes
    • Member since 07-24-2002, 8:27 AM
    • Netherlands
    • Posts 424

    Hi all,

    I was wondering if it is possible to add a new Sql Server 2008 Database to my App_Data folder in VS2008 SP1. I do have Sql Server 2008 Express edition installed.

    Cheers,

    Wes

    Listen carefully, I will say this only once...
    Filed under:
  • Re: Add new Item -> SQL Server 2008 Database.mdf

    09-07-2008, 11:16 PM

    Hi Wes,

    Yes. We can do this with SQL Server 2008 Express and Visual Studio 2008 SP1.

    Jian Kang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Add new Item -> SQL Server 2008 Database.mdf

    09-08-2008, 4:00 AM
    • Participant
      1,983 point Participant
    • webbes
    • Member since 07-24-2002, 8:27 AM
    • Netherlands
    • Posts 424

    I thought so, but I can't find the option. I do have both SQL Server 2008 Express and VS SP1 but the only database option I have(under 'Add new Item' in my project) is 'SQL Server Database' which leaves me with a SQL Server 2005 mdf file. I would like to end up with a SQL Server 2008 mdf file. I there a template I can download?

    Thanks for your help,

    Wes

    Listen carefully, I will say this only once...
  • Re: Add new Item -> SQL Server 2008 Database.mdf

    09-08-2008, 7:26 AM
    Answer

    Please check the version of the newly created SQL Server database files.

    Attach the database files in SQL Server Management Studio, right-click the database name, choose Properties, then check Compatibility level in the Options tab.

    If the Compatibility level of the newly created database files is "SQL Server 2005 (90)", I think maybe there are both SQL Server 2005 Express and SQL Server 2008 Express on your machine.

    If so, please try to modify the SQL Server Instance Name in Visual Studio 2008.
    Go to Tools -> Options -> Database Tools -> Database Connections, fill the SQL Server Instance Name with the name of SQL Server 2008 Express instance. Then create a new database in Visual Studio 2008 and check its version to confirm.
     

    Jian Kang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Add new Item -> SQL Server 2008 Database.mdf

    09-08-2008, 7:42 AM
    • Participant
      1,983 point Participant
    • webbes
    • Member since 07-24-2002, 8:27 AM
    • Netherlands
    • Posts 424

    Jian Kang - MSFT:

    If the Compatibility level of the newly created database files is "SQL Server 2005 (90)", I think maybe there are both SQL Server 2005 Express and SQL Server 2008 Express on your machine.

    If so, please try to modify the SQL Server Instance Name in Visual Studio 2008.
    Go to Tools -> Options -> Database Tools -> Database Connections, fill the SQL Server Instance Name with the name of SQL Server 2008 Express instance. Then create a new database in Visual Studio 2008 and check its version to confirm.
     

     

    This solved my problem. Thanks a bunch!

    Wes

    Listen carefully, I will say this only once...
  • Re: Add new Item -> SQL Server 2008 Database.mdf

    09-26-2008, 1:38 PM
    • Member
      570 point Member
    • muybn
    • Member since 08-06-2005, 7:28 AM
    • Salt Lake City, UT
    • Posts 863

    Jian Kang - MSFT:

    Please check the version of the newly created SQL Server database files.

    Attach the database files in SQL Server Management Studio, right-click the database name, choose Properties, then check Compatibility level in the Options tab.

    If the Compatibility level of the newly created database files is "SQL Server 2005 (90)", I think maybe there are both SQL Server 2005 Express and SQL Server 2008 Express on your machine.

    If so, please try to modify the SQL Server Instance Name in Visual Studio 2008.
    Go to Tools -> Options -> Database Tools -> Database Connections, fill the SQL Server Instance Name with the name of SQL Server 2008 Express instance. Then create a new database in Visual Studio 2008 and check its version to confirm.
     

    I just installed the full trial version of SQL Server 2008. When I go back in and try to install the SSMS, in the Installation Rules portion of the setup procedure, it shows "Failed" under the "Previous releases of Microsoft Visual Studio 2008" rule, with the message "A previous release of Microsoft Visual Studio 2008 is installed on this computer. Upgrade Microsoft Visual Studio 2008 to the SP1 before installing SQL Server 2008." This is ridiculous since my update menu says there are no updates at all waiting for VS. At every turn in the last 4 days, I've had stupid problems like this and I can't get anything done on my project and I don't know where to turn for help.

    In my desperation to get the fastest answer, I made a new post with the above issue.

  • Re: Add new Item -> SQL Server 2008 Database.mdf

    09-26-2008, 9:51 PM

    Hi muybn,

    For quicker and better responses, please avoid posting duplicate threads.

    Jian Kang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: Add new Item -> SQL Server 2008 Database.mdf

    02-14-2009, 1:03 AM
    • Member
      2 point Member
    • vuhungtuananh
    • Member since 01-13-2007, 11:15 AM
    • Posts 8

    How about with another SQLServer 2008 Edition? I try with SQLServer 2008 Enterprise, but i can't create database file in VS, and i only installed a instance of SQLServer. It isn' work?

    Can anyone can help me?

  • Re: Add new Item -> SQL Server 2008 Database.mdf

    02-14-2009, 1:18 AM

    Hi,

    If we don’t have SQL Sever Express Edition installed, we can’t create new SQL Server database files in “App_Data” folder. Since there is already SQL Server Enterprise Edition on your machine, I would suggest you just install a new SQL Server Express Edition instance alongside it and specify the SQL Server Instance Name as my previous reply.

    SQL Server 2008 Express Edition
    http://www.microsoft.com/express/sql/download

    Please post the issues in a new thread.

    Jian Kang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Can not add SQl Server database (.mdf) to solution explorer WFA project : (

    09-29-2009, 2:59 PM
    • Member
      2 point Member
    • Mr. R
    • Member since 09-29-2009, 2:52 PM
    • Posts 1

    I recently purchased Visual Studio 2008 Professional Edition. I installed the SQL Server 2005 Developers Edition that came in the package, then installed VS 2008. Both programs seemed to run perfectly fine until I got the project in solution explore and try to right click---> add new item -----> Visual C#-----> Data----> SQL Server Database.

    The program runs an error proxy and delivers the following message.

    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 know what your thinking, go to control panel, to to add remove programs list, right click vs 2008 and install the onboard 2008 express. But it still does not work! I've been messing with this problem for two weeks and feel like I've just been had for $739.00

    Please help!

Page 1 of 1 (10 items)