Lollipop

Welcome to PcCare.com

Visual Studio .mdf import export 

 

How to import and export data from-toVisual Studio .mdf database.

 

  • Install Microsoft SQL server 2005 or 2008. During installation add  Client Tools SDK (needed for import/export functionality). Install SQL express  if you can't purchase the full version.
  • Start Microsoft SQL server managment studio. Start->Microsoft SQL server 2008->Microsoft SQL Server management studio.
  • Start Visual Studeio, Start->Microsoft Visual Studio 2008 ->Menu->view->Server Explorer
  • Right click on Database.mdf->Properties
  • copy Primary File path value
  • Right click on Databases in Microsoft Sql Server Management studio
  • Attach the .mdf pointed to by the Primary File Path.
  • It is now possible to utilize bcp or OPENROWSET to import/export data. If you installed the full version of SQL server 2008, use it's import export utility Start->Microsoft Sql Server 2008->Import Export data 32 bit.
  • Return to Visual Studio->Server explorer and attach the sql server instance of the database. Delete the original. 

 

 

 

 

DISCLAIMER: It is assumed that users are familiar with the operating system they are using and comfortable with making the suggested changes. PcCare.com will not be held responsible if changes you make cause a system failure.

Please review our Terms of Service and Privacy statement before initiating service or using this site. Microsoft® and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. PcCare Site Map. About Us