 |
BOOK: Beginning ASP.NET 1.0  | This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

August 2nd, 2004, 10:08 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Database Connection Object
Hello,
I am trying to create a DB Connection Object called "objDBConn"
I want to re-use this object through my VB.NET application, thus why I am creating an object. My question is: Should I put all connection info in my object such as connection string, etc?
Please any help with this is greatly appreciated.
Thanks in Advance,
Mark
|
|

August 2nd, 2004, 01:45 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
I don't know if you want an open connection to a database at a globular level. You can create an object at each form or web page level, then make it accessible to an entire form. But for performance, it is wiser to open and close it only when you need it.
Brian
|
|

August 2nd, 2004, 04:36 PM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Brian,
Thanks for the reply. I have been reading about accessing the Database from the system registry...This way it is easier to install the application.
You know anything about that...
Thanks,
Mark
|
|

August 3rd, 2004, 07:05 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Hey,
Never heard of storing the database, but it is common practice to store the connection string in the database to connect to in the registry.
Brian
|
|

August 3rd, 2004, 07:42 AM
|
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry, that is what I meant. I want to store the connection string to the database, in the registry. Then access the connection String in the registry from my objDBConn.
I have most of this figured out and understand it, the only thing I am having trouble with now is, I am not sure if I need to call the string value in my registry.
Example:
In Registry my file is like this:
LocalMachine\Software\MyApp\ConnectionString
Do need to specify it like this
OR do I just need Software\MyApp
Thanks in Advance,
Mark
|
|
 |