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 7923881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:28:02+00:00 2026-06-03T17:28:02+00:00

I have created a database with SQL Server Management Studio, I would like to

  • 0

I have created a database with SQL Server Management Studio, I would like to now use it in my C# application. I need the connection string?

Where can I find the connection string, and where is my database stored?

Do I have to publish it or something like that, or is it in my documents somewhere?

using (var conn = new SqlConnection("your connection string to the database"))

How do I obtain the connection string? Where can I find the connection string to copy paste into the above section?

How to I publish my database so that Visual Studio can pick it up? Then I can just pull the connection string of there?

  • 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-03T17:28:19+00:00Added an answer on June 3, 2026 at 5:28 pm

    The easiest way to get the connection string is using the “Server Explorer” window in Visual Studio (menu View, Server Explorer) and connect to the server from that window.

    Then you can see the connection string in the properties of the connected server (choose the connection and press F4 or Alt+Enter or choose Properties on the right click menu).

    Advanced connection string settings: when creating the connection, you can modify any of the advanced connection string options, like MARS, resiliency, timeot, pooling configuration, etc. by clicking on the “Advanced…” button on the bottom of the “Add connection” dialog. You can access this dialog later by right clicking the Data Connection, and choosing “Modify connection…”. The available advanced options vary by server type.

    If you create the database using SQL Server Management Studio, the database will be created in a server instance, so that, to deploy your application you’ll have to make a backup of the database and deploy it in the deployment SQL Server. Alternatively, you can use a data file using SQL Server Express (localDB in SQL Server 2012), that will be easily distributed with your app.

    I.e. if it’s an ASP.NET app, there’s an App_Datafolder. If you right click it you can add a new element, which can be a SQL Server Database. This file will be on that folder, will work with SQL Express, and will be easy to deploy. You need SQL Express / localDB installed on your machine for this to work.

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

Sidebar

Related Questions

I have created a database with 8 tables in SQL Server Management Studio on
I have created one user named tuser with create database rights in SQL server
I am pretty new to C# and SQL Server database. I have created a
I have a database that I have created using SQL Server Developer 2008. I
I have designed database tables (normalised, on an MS SQL server) and created a
I have installed ASP.NET application with database on our server. ASP.NET application created database
I'm trying to put together a database in SQL Server Management Studio 2008 which
I have an existing MVC3 application and database that is on a SQL Server
I have created a database test with some tables in MS SQL Server 2008
Im using c# .net windows form application. I have many databases created using sql

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.