Marc Rufer bio photo

Marc Rufer

Software engineer
@d-fens GmbH

Twitter Google+ LinkedIn Github Stackoverflow
RSS Feed

HOWTO Create LocalDB File (.mdf) manually in Visual Studio 2015

Marc Rufer 19 Jan 2017 SQL VisualStudio

If you are using LocalDB and want to create an empty database you should perform the following steps.

  1. Go to Visual Studio Server Explorer > Data Connections
  2. Select Add Connection from the context menu
  3. Change Data Source to Microsoft SQL Server Database File (i.e. LocalDB)
  4. Set the Database file name by entering a database name and path that corresponds to the name in the web.config/app.config connectionstring. Replace |DataDirectory| with path to the place the database file should be created at (i.e. App_Data)
  5. Select Advanced and set the properties according to the following example connection string

     Data Source=(localdb)\v11.0; Initial Catalog=Arbitrary; Integrated Security=True; MultipleActiveResultSets=True; AttachDbFilename=C:\PATH\TO\Arbitrary.mdf
    
comments powered by Disqus

Posts

HOWTO Access Azure File Share in PowerShell Script executed by a Scheduled Task BUG "Task Scheduler service is not available" Error, if specifying Network Connection Condition HOWTO Sync OneDrive on Server even if Windows User not logged in HOWTO Access Microsoft Access Database with PowerShell Get NetworkCredential from PSCredential splits Username into Username and Domain HOWTO Create LocalDB File (.mdf) manually in Visual Studio 2015 HOWTO Set Cookie Header on DefaultRequestHeaders of HttpClient HOWTO Set up PowerShell Remote Session Configuration HOWTO Analyze PowerShell Scripts with PSScriptAnalyzer HOWTO Sign PDF with SuisseID NoBrainer PUT/PATCH/MERGE with OData Service Client Apply Commit from one Repository to another GitHub Repository creation with PowerShell HOWTO Sign PowerShell Script with SuisseID Swissunihockey game schedule PDF generator HOWTO Maven Release on JetBrains TeamCity Limitations when running Activiti in H2 Embedded Mode HOWTO Pylint Integration in IntelliJ 14 HOWTO Install Windows 10 IoT Core on Raspberry PI 2 from a VM First steps with Dropwizard Allman code style for IntelliJ First steps with Flyway IntelliJ - Setup custom inspection profiles Configuration properties meta-data support in IntelliJ AMQP Integration with spring integration OCA Java SE 7 Programmer I Certification Guide Swissunihockey key matcher Swisscom SMS-API-Client Some hints concerning logging with Log4j IFTTT A brilliant service Run deltacloud on a VirtualBox-VM Project specific maven settings in IntelliJ AngularJS Javascript for beginners Liferay in Action