0

I am using Microsoft Visual Studio. I was able to establish connection to a database odbc without writing any code. I went to TOOLS ... Etc.

Now I want to retrieve those code lines that established this connection.

How can i do this?

3 Answers 3

3

Hope this helps:

To edit a connection string stored in application settings:

In Solution Explorer, double-click the My Project icon (Visual Basic) or Properties icon (Visual C# to open the Project Designer. Select the Settings tab. Locate the connection you want to edit and select the text in the Value box. Edit the connection string in the Value box.

Reference: http://msdn.microsoft.com/en-us/library/ms171887(v=vs.110).aspx

Sign up to request clarification or add additional context in comments.

Comments

3

If you just want to see them, you can go into debugger, set a break point after the connection you read, Ctrl+Shirt+Q for Quick Watch. and look through the object in memory

Comments

1
SqlConnection _connection = new SqlConnection("connection string")

Read SqlConnection class in MSDN.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.