Re: global connections
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 11/09/04
- Next message: Stefan Hong: "Re: Inconsistant null parameter handling in Reflection"
- Previous message: Maqsood Ahmed: "Re: Time Problem"
- In reply to: Mike P: "global connections"
- Next in thread: Daniel Jin: "Re: global connections"
- Reply: Daniel Jin: "Re: global connections"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 9 Nov 2004 10:36:26 -0500
Mike,
Having a connection open all the time to a database is not a good thing.
If anything, you should be opening and closing it when you need it.
In general, it would be a good idea to abstract out the data access
stuff. This way, you create a single pipe through which all of your data
access will flow. This is a good thing, because any changes you have to
make will be propogated everywhere (instead of you having to go around and
change everything yourself).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Mike P" <mrp@telcoelectronics.co.uk> wrote in message
news:efqQdzmxEHA.1396@tk2msftngp13.phx.gbl...
>I am converting a VB6 app to C# and the VB6 app has 1 connection and 3
> recordsets, all global and open all the time so that all the required
> procedures can use them. Using C#, would it be best to have a global
> connection and datareaders etc, or is it better to put all the db stuff
> into a seperate class and make calls to this whenever I need to
> read/amend data?
>
> Any advice would be really appreciated.
>
>
> Cheers,
>
> Mike
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
- Next message: Stefan Hong: "Re: Inconsistant null parameter handling in Reflection"
- Previous message: Maqsood Ahmed: "Re: Time Problem"
- In reply to: Mike P: "global connections"
- Next in thread: Daniel Jin: "Re: global connections"
- Reply: Daniel Jin: "Re: global connections"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|