idb2Connection

Joined
Feb 11, 2010
Messages
1
Reaction score
0
I have a simple ado.net application that executes a 'select' statement on the iSeries. Our system operator found that the connections used by the applicaiton do not clear out of memory on the iSeries. Am I missing something here....

DataTable dtRecords = new DataTable();
iDb2Connection objConnection = null;
try
{
objConnection = new iDb2Connection("...");
idb2Command objCommand = new Idb2Command ("Select something from somewhere",objConnection);

using(idb2DataReader dr = objCommand.ExecuteReader())
{
dtRecords.Load(dr,LoadOption.OverwriteTable());
}
objCommand.Dispose();

}
catch(idb2Exception iS)
{
...
}
catch(SystemExceptions er)
{
...
}
finally
{
objConnection.Dispose();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top