If your using the Oracle 10 Net provider , from oracle, not only are
the .Net Connections pooled, but the provider pools as well.

What I basically do is store the connection string in a private
variable, and keep opening and closing the connection as needed.

OpenConnection(string)
ExecuteSQL()
CloseConnection()

>From monitoring the database that I'm connected to, the only time I
see the connection pool decreasing is when the Db Layer objects are
GC'ed , however any differing connection string will start a new
collection of objects.

if the files are really huge, try to cache the data somewhere and do
one massive update in a transaction, instead of proccessing and
inserting as you go.

Dave.



On 4/13/05, Eduard Lascu <[EMAIL PROTECTED]> wrote:
> Ido,
> 
> Is there a place where I can check the documentation for the Enterprise
> Library or do I need to download it and install it first?
> 
> Francis,
> 
> I have a process that receives thousands of Xml messages every day and saves
> them to the database. I don't want to open a new connection for every file
> that is processed as this is not a good practice in terms of managing
> Oracle's internal resources.
> 
> So the steps are:
> 1. open a connection;
> 2. start processing files, one by one;
> 3. close the connection when there are no more files to process;
> 
> The thing is that while the files are processed, the connection can be lost.
> Evidently, the insertion of the data will fail, but the error indicated in
> the exception raised has different values, depending on what exactly caused
> the connection to go down.
> 
> Anyway, my code catches the exception (which is not a constraint violation,
> so it does not ignore the file) and moves on to the next file. Before every
> file is processed I check whether the connection is still open. In the case
> of an error, OracleConnection.State will still be ConnectionState.Open
> although the connection has gone down.
> 
> If

===================================
This list is hosted by DevelopMentor�  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to