Visula Studio Express - Connect to Database

  • i'm trying to connect to a database where the mdf files have been copied from another machine.

    I select the main mdf file to attach the database, but when I click OK, the path for the other mdf files that make up the DB defaults to their original path from the old machine and I can't see an obvious way of changing it. i.e they were on the D drive on the old machine, but are on the C drive on the machine where Visual Studio is installed.

    I'm therefore unable to open the database.

    Is there a way round this?

    Thanks

    Andrew

  • Try doing the attach from within SSMS (or in your case SSMS Express). Once you add the main MDF, but before you click the attach button, you will get an option to change the paths of the other files.

    if you don't have it already - you can download SSMSE from Microsoft's download center.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Yes. That does the trick.

    Thanks

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

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