How do I connect to SQL Server 2008 using VWD

  • Hi all,

    First of all, let me tell you that I am not really good at databases. So I would need a bit more of a laymans explanation for this. Sorry about it. Let me get to the problem now.

    i am using a 2003 sql server database file abc.mdf and abc.ldf .. I installed Visual Web Developer 2008 (VWD) and I wanna connect this db file to my project in VWD. For some reason I cant connect to the db file saying the connection string is incorrect.

    To connect the db to the database explorer I used the following settings

    ----------------------------------------------------------------------

    Data Source: Microsoft SQL Server Database File (SqlClient)

    Database file name (new or existing): C:\Users\Dev\Documents\Visual Studio 2008\Projects\ABC\ABC\abc.mdf

    Log on to the server: Use Windows Authentication

    The connection string I got from the Database Properties panel of the db connection is as follows

    Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Users\Dev\Documents\Visual Studio 2008\Projects\ABC\ABC\abc.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True

    This doesnt work. I tried many versions of different connection string. It all came up with different error messages. Please help me find the right connection string.

    Thanks in advance,

    Chuma

  • Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Users\Dev\Documents\Visual Studio 2008\Projects\ABC\ABC\abc.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True

    The above is your problem you are trying to attach a SQL Server 2000 database as a User Instance that is invalid because 2000 files must be upgraded to compatibility 100 to attach to 2008 as a User Instance.

    You have two options start with User Instance False, if it is not fixed then you need to add the files to the data subfolder in SQL Server folder in programs and go to Management studio to attach it. Right click all tasks attach.

    Kind regards,
    Gift Peddie

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply