Ok.
I remove my Dispose method at the end of the function.
Then, why after 200 command execution a process memory it increase from
30 mb to 400 mb,
in few minuts?

It seems that the GC does not understand that comes however executed the
auto Dispose() command. 
How never? 
It's necessary to set up some flag? 
Using others driver net it is for Oracle that for Sql Serveur this does
not happen. 

Thanks

-----Messaggio originale-----
Da: Jiri Cincura [mailto:[EMAIL PROTECTED] 
Inviato: mercoledì 29 agosto 2007 18.31
A: [EMAIL PROTECTED]; For users and developers of the Firebird .NET
providers
Oggetto: Re: [Firebird-net-provider] Invalid attempt of read when the
reader is closed.


On 8/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi,
>   using a version 2.1.0 RC-1 i have
>   some problem with a Dispose
> method.
>
>   Why throw this exception ?
>    "Invalid attempt of read when
> the reader is closed."
>
>   I create a FbCommand in this mode:
>
>   private
> static object executeQuery(DbConnection p_conn, string p_sql, 
> hashtable
> p_params)
>  {
>     DbCommand oc = null;
>     object res = DBNull.Value;
>
>     if (p_conn.getType().Equals(typeOf(FbConnection)) ){
>        oc =
> new FbCommand(p_sql, (FbConnection)p_conn);
>        ... assign params
>        res = oc.ExecuteReader();
>
>     }
>     ...other
> database connection type, such as Oracle, Sql Server...
>
>     oc.
> Dispose();
>
>     return res;
>   }
>
>   I use the Dispose() method
> because I see the memory of the
>   main process increase in exponential
> mode.
>
> Sorry for my bad english.
>
> Thanks.
>
> Alberto
>

When you dispose connection, the connection is also closed. So then,
you're not able to read domething from datareader.

-- 
Jiri {x2} Cincura (Microsoft Student Partner)
http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com


-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.484 / Virus Database: 269.12.10/976 - Release Date:
27/08/2007 18.20



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to