How to get the current DB connection?

Hi

I would like to do a SELECT statement to my SQL server. And I don't want to recreate a connection again. I want to use the current one. But, how to get it?

Thanks.
LVL 1
Abdurahman AlmatrodiBusiness DevelopmentAsked:
Who is Participating?
 
Abdurahman AlmatrodiConnect With a Mentor Business DevelopmentAuthor Commented:
I found it. it can be found in:
Properties.Settings.Default.[The Name]  
0
 
BTosonCommented:
Hi,
Without seeing your code it will be near impossible to answer.
0
 
Abdurahman AlmatrodiBusiness DevelopmentAuthor Commented:
It is in the Application Settings
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
BTosonCommented:
Well where in your code do you open the connection to your database?
What method are you using to connect/interrogate it?
0
 
Abdurahman AlmatrodiBusiness DevelopmentAuthor Commented:
I mean I did not write it. The connection wizard did.
0
 
BTosonCommented:
Well you must have the connection defined somewhere.
You can executre multiple queries using one connection but how you do it depends on what you are doing!
0
 
Abdurahman AlmatrodiBusiness DevelopmentAuthor Commented:
I did not write that. I run wizard for the first time and that is it. Later, I just create datasets only.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.