?
Solved

How to get the current DB connection?

Posted on 2008-11-09
7
Medium Priority
?
349 Views
Last Modified: 2012-05-05
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.
0
Comment
Question by:Abdurahman Almatrodi
  • 4
  • 3
7 Comments
 
LVL 4

Expert Comment

by:BToson
ID: 22918440
Hi,
Without seeing your code it will be near impossible to answer.
0
 
LVL 1

Author Comment

by:Abdurahman Almatrodi
ID: 22918492
It is in the Application Settings
0
 
LVL 4

Expert Comment

by:BToson
ID: 22918497
Well where in your code do you open the connection to your database?
What method are you using to connect/interrogate it?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:Abdurahman Almatrodi
ID: 22918502
I mean I did not write it. The connection wizard did.
0
 
LVL 4

Expert Comment

by:BToson
ID: 22918508
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
 
LVL 1

Author Comment

by:Abdurahman Almatrodi
ID: 22918514
I did not write that. I run wizard for the first time and that is it. Later, I just create datasets only.
0
 
LVL 1

Accepted Solution

by:
Abdurahman Almatrodi earned 0 total points
ID: 22918667
I found it. it can be found in:
Properties.Settings.Default.[The Name]  
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question