I'm not able to attach the database in server explorer in VS2008

Last post 06-20-2009 4:16 PM by Ibro. 5 replies.

Sort Posts:

  • I'm not able to attach the database in server explorer in VS2008

    06-20-2009, 1:02 PM
    • Member
      4 point Member
    • vbdesai
    • Member since 06-20-2009, 2:09 AM
    • Posts 11

     Hi! I am trying to attach database in server explorer in VS 2008 but it gives me the following error.

    " An attempt to attach an auto-named database file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\ Data\ NORTHWND.mdf failed. A database wth the same name exists, or specified file cannot be opened, ot it is on UNC share."

    So, please help me to resolve this error. 

  • Re: I'm not able to attach the database in server explorer in VS2008

    06-20-2009, 1:39 PM
    • Participant
      1,231 point Participant
    • Ibro
    • Member since 10-08-2008, 10:17 AM
    • Posts 390

    I think that the database you trying to attcah is already in the databse explorer.

    Try to cut that database and paste it somewhere in you computer such as in myDocuments folder and try to attach it same you tried before,, it will work..

    does this reply help you? mark as an answer
    Ibro
  • Re: I'm not able to attach the database in server explorer in VS2008

    06-20-2009, 2:00 PM
    • Member
      4 point Member
    • vbdesai
    • Member since 06-20-2009, 2:09 AM
    • Posts 11

     HI Ibro,

    Thanks for ur reply. but I haven't any database attached in server explorer. and whenever I tried to attach any database file it gives me the same  eeror everytime. I have tested the coneection and that is fine. but when i try to attach file it gives me error. So, reply me if you have any idea about this error.

     

    Thanks,

  • Re: I'm not able to attach the database in server explorer in VS2008

    06-20-2009, 2:23 PM
    • Participant
      1,231 point Participant
    • Ibro
    • Member since 10-08-2008, 10:17 AM
    • Posts 390

    how are you trying to attach database to VS2008?

    right click on you project and seleect Add Existing Item then browse to your database,,

    does this reply help you? mark as an answer
    Ibro
  • Re: I'm not able to attach the database in server explorer in VS2008

    06-20-2009, 3:52 PM
    • Member
      4 point Member
    • vbdesai
    • Member since 06-20-2009, 2:09 AM
    • Posts 11

     Hi Ibro,

    I have a problem in attaching database file in server explorer in VS2008. In server explorer I right click on database connection, so it opens add connection dialog box. Then I have given the server name and test connection. It was succeded. Then I click attach a database radio button and add a database file. now when I press ok button it is giving me an error.

    Thanks,

  • Re: I'm not able to attach the database in server explorer in VS2008

    06-20-2009, 4:16 PM
    Answer
    • Participant
      1,231 point Participant
    • Ibro
    • Member since 10-08-2008, 10:17 AM
    • Posts 390
    does this reply help you? mark as an answer
    Ibro
Page 1 of 1 (6 items)