How to get the connection String from a database

0 votes

I want to use the database I generated with SQL Server Management Studio in my C# program. The connection string is what I require. Where is my database kept, and where can I get the connection string?

Is it in my papers somewhere, or do I have to publish it or something similar?

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

I want to get the connection string, but how? Where can I get the connection string that I need to copy and paste into the aforementioned section?

How can I make my database publishable so that Visual Studio can use it? The connection string can then be removed from there, right?

Aug 20, 2022 in Database by Kithuzzz
• 38,000 points
457 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
2 answers

How to select the nth row in a SQL database table?

SELECT * FROM ( SELECT ID, NAME, ROW_NUMBER() ...READ MORE

answered Apr 23, 2020 in Database by anand
• 140 points
26,261 views
0 votes
1 answer

How to drop all tables from a database with one SQL query?

Use the INFORMATION_SCHEMA.TABLES view to get the ...READ MORE

answered Feb 4, 2022 in Database by Neha
• 9,020 points
8,976 views
0 votes
0 answers

How to fetch the nth highest salary from a table without using TOP and sub-query?

I was recently requested to create a ...READ MORE

Aug 25, 2022 in Database by Kithuzzz
• 38,000 points
1,382 views
0 votes
0 answers

How to return only the Date from a SQL Server DateTime datatype

SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part ...READ MORE

Sep 6, 2022 in Database by Kithuzzz
• 38,000 points
508 views
0 votes
1 answer

How to retrieve the current version of a MySQL database management system (DBMS)?

Many responses advise using mysql —version. But ...READ MORE

answered Sep 20, 2022 in Database by narikkadan
• 63,600 points
688 views
0 votes
1 answer

How to install C#

Hi @Akanksha, C# is a programming language ...READ MORE

answered Feb 28, 2019 in Others by Pratibha
• 3,690 points
1,103 views
0 votes
1 answer

How to run C# code on Ubuntu

Hey @Abha, you can create and run ...READ MORE

answered Mar 1, 2019 in Others by Anvi
• 14,150 points
6,461 views
+1 vote
2 answers

RPA C# - Process developments in C #

Hey Conell, you can use Visual Studio's ...READ MORE

answered May 24, 2019 in RPA by Abha
• 28,140 points
2,449 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP