Solved

How to add database to asp.net project folder vs2012

Posted on 2014-11-25
6
240 Views
Last Modified: 2014-11-25
A small asp.net c# application works with a remote database (on the same computer).

Question: What are the steps to upload this database to asp project folder?
0
Comment
Question by:Mike Eghtebas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40465704
What do you mean by "remote database"? What kind of database is this?
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40465719
It is in SSMS. I want to bring into solution folder as we do with desktop application (as local file).
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40465740
SSMS is a utility for interacting with SQL Server and some of its lighter variants. It alone is not a database. Are you therefore saying that you are working with SQL Server? Or perhaps SQL Server Express or Compact?
0
Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40465756
My apology for poor description. I have SQLEXPRESS12, the database I work with now is in the Data folder (C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS12\MSSQL\DATA) and this is how SSMS sees it.

I will not be using compact version. What I want to do is to upload this database from DATA folder (after it is off line and detached) into my asp solution folder.

The reason I am doing it to make this application portable. Later when I try it on another computer; which also has SQLEXPRESS12, would allow me to demo the app on that computer.
0
 
LVL 81

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 40465807
take the database offline
copy it to your appdata folder
attach it from your appdata folder.
0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 40465825
I can manually copy and paste it into App_Data folder manually. But I am looking for a wizard solution that it works.

I tried: On the solution folder right-click/Add/Existing Item...  this gives me the browser. After selecting the .mdf file, the database gets copied solution folder whereas I was expecting to put in App_Data folder which it doesn't.

Eventually, I want to add few tables and procs into a LINQ-TO-SQL interface to create a .dhml file to work with.

This process seemingly is different with asp compare to desktop which I am quite familiar with.

Question: How is this done in a asp.net application?
0

Featured Post

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question