how to add my databse to my project??

Last post 05-18-2009 10:32 PM by chandu123. 2 replies.

Sort Posts:

  • how to add my databse to my project??

    05-18-2009, 11:36 AM
    • Member
      22 point Member
    • chandu123
    • Member since 05-15-2009, 11:43 AM
    • Posts 103

     I am using sql server management studio 2005 express i have created my own database in it,but i want to add that databse to my project i dnt know how, i have added database to my project by right clicking on app_data and add new item but it is not my database please help me on this.THANKS.

    ***He who angers you conquers you***
  • Re: how to add my databse to my project??

    05-18-2009, 12:09 PM
    Answer
    • Star
      7,932 point Star
    • amit.jain
    • Member since 10-06-2008, 5:09 AM
    • Delhi India
    • Posts 1,264

     Either add a new Database in ur project as u've already done and create tables and enter data through visual studio database explorer (Double click on dataBaseName.mdf )

    If you want to add the database you've created in sql server express than right click on databse name in sql server management studio and select detach 

    Copy the databaseName.mdf and  databaseName_Log files from sql server installation directory (usually C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data)  to desktop

    Now right click on solution explorer in Visual studio > select Add existing item > browse to databsename.mdf on desktop > click ok 

     

    Done 

     

     

     

    Don't say thanks rather mark my reply as "Answer" if it helps you ,Doing so u'll get points too
    amiT jaiN

    ASP.NET C#.NET Articles
  • Re: how to add my databse to my project??

    05-18-2009, 10:32 PM
    • Member
      22 point Member
    • chandu123
    • Member since 05-15-2009, 11:43 AM
    • Posts 103

     yes it worked thanks.

    ***He who angers you conquers you***
Page 1 of 1 (3 items)