Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing a projects Connection Object

Status
Not open for further replies.

ProjectExplorer

Programmer
Mar 22, 2002
95
GB
Hi

When you create a new data connection (using the Wizards) I presume a new Connection object is added to your project containing the connection string etc. amoungst it's properties.

I want to pass that connection object to another object - how can I reference the projects Connection Object?

I can only find the connection string.

Any help appreciated.

Thanks

 

Things like this are why I dislike using the wizard to connect to my data. Doing everything in code takes a bit more work, but you have complete control over all of the objects, etc.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
You can get the info you need from using MY.SETTINGS

Example
Dim CN as string
CN = My.Settings."YourConnectionStringHere
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top