Hello,
i think there is a problem when imbicate two connections because after
close each of them there is still two open.
an exemple of code :
[code]
private void dotask()
{
IDataReader a;
FbConnection fbconnect = new FbConnection(connect);
fbconnect.Open();
FbCommand fbc1 = new FbCommand("select * from tva", fbconnect);
a = fbc1.ExecuteReader(CommandBehavior.CloseConnection);
OtherSql(); // imbricated
a.Close();
fbc1.Dispose();
fbconnect.Close();
}
private void OtherSql()
{
IDataReader b;
FbConnection fbconnect2 = new FbConnection(connect);
fbconnect2.Open();
FbCommand fbc2 = new FbCommand("select * from catproduit",
fbconnect2);
b = fbc2.ExecuteReader(CommandBehavior.CloseConnection);
b.Close();
fbc2.Dispose();
fbconnect2.Close();
}
[/code]
After executing DoTask() there is two connection open or i think that
only one still open (for the pool i think);
but if you put othersql at the end of dotask() there is only one
connection open.
[code]
private void dotask()
{
IDataReader a;
FbConnection fbconnect = new FbConnection(connect);
fbconnect.Open();
FbCommand fbc1 = new FbCommand("select * from tva", fbconnect);
a = fbc1.ExecuteReader(CommandBehavior.CloseConnection);
a.Close();
fbc1.Dispose();
fbconnect.Close();
OtherSql(); // not imbricated !
}
[/code]
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider