Hi!

I have to return FbDataReader object from function. So I 
write this:

public static FbDataReader getReader(string sql)

  FbConnection conn = new FbConnection(MF.constr);
  FbCommand command = new FbCommand(sql, conn);
  conn.Open();
  FbDataReader reader = command.ExecuteReader();            
  return reader;
}

But when I run the application and rise the function many 
times per minute I've grtting "Timeout exceed" exception write on 
conn.Open() method rising. I think this because of I havn't 
close the connection and garbage collector do not clean the 
memory quickly enought, but I can't to rise conn.Close() 
before I return reader. So what should I do to solve this 
problem?

Vlad Panteleev,
http://panvladislav.1gb.ru
http://mobile.1gb.ru

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to