Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9095193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:32:10+00:00 2026-06-16T23:32:10+00:00

I have been doing C# asp.net exercises for a while and ussually I would

  • 0

I have been doing C# asp.net exercises for a while and ussually I would add an Access Database to the application Data folder of my project and then with my OleDbConnection string connect to the database and interact with the tables.

I however want to now add an existing Microsoft sql 2008 express edition database to my asp.net project(visual studio 2012) but am struggling to do this as it is not a case of simply adding the databse to the application data folder and making a connection using the connection string necessary.

What would the walkthrough or step by step procedure be for doing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:32:11+00:00Added an answer on June 16, 2026 at 11:32 pm

    What would the walkthrough or step by step procedure be for doing this?

    1. Install SQL Server (Full Edition) if not already installed (could be installed on the same machine as the web application or on a separate machine).
    2. Create a database inside this SQL Server.
    3. Create the tables inside the newly created database.
    4. Specify the connection string to this SQL server.

    You could of course use an embedded database. For example VS 2012 comes with a LocalDB which stores the files inside the App_Data folder. When you create a new ASP.NET MVC 4 application using the internet template it will set everything up for you. But that’s not a production ready database. Basically it sets a connection string pointing to the App_Data folder:

    <connectionStrings>
      <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-MvcApplication1-20130107093649;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-MvcApplication1-20130107093649.mdf" providerName="System.Data.SqlClient" />
    </connectionStrings>
    

    and setting entity framework to use this provider:

    <entityFramework>
      <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    </entityFramework>
    

    So when you are ready to deploy your application to production and have a running SQL Server instance all you need to do is change the connection string to point to this SQL instance.

    Here’s a nice article on MSDN with various connection strings that you could use based on the target database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been doing ASP.NET for a while, and have done very little in
I have been doing ASP.NET / C# development for several years now. I have
I have a ASP.NET MVC 3 application, using Entity Framework 4 to handle Data
We have been using log4net for logging our asp.net web forms application. Our logging
I'm not a WinForms developer, but have been doing ASP.NET for quite some time.
I have been doing classing ASP and pretty new to ASP.NET. In classic ASP,
I have been building ASP.NET MVC application and I'm worried about potential multi-threading issues
My team has a new Asp.net MVC intranet app. I have been doing some
I have an ASP.NET site and I've been doing some work refactoring code to
I have an ASP.Net MVC3 application that has been running fine in the default

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.