Is progress connection really closed?

maploosh

New Member
I have a c# application that uses the 'merant 4.10 Sql92' driver to connect to a progress database (I am running progress 9.1e). I can connect and pull information from the database with no issues. I have a log that shows when a call is made to the database and then when the user making the call logs out. The problem I have is that when I make a call to the database it shows me logging in but when I close the connection to the database it does not show me logging out right away. After a minute of inactivity to the database from my application the log will show me logging out. If I make my call and then close my application the log will once again show me logging out. Does anyone know why the database does not log me out right away after my connection is closed? Here is a sample of my code:

using (OdbcConnection connection = new OdbcConnection(ConfigurationSettings.AppSettings["Connection"]))
{
connection.Open();
using(OdbcTransaction trans = connection.BeginTransaction (System.Data.IsolationLevel.ReadUncommitted))
{
using (OdbcCommand odbcComm = new OdbcCommand("My Query", connection))
{
using(OdbcDataAdapter odbcAdapt = new OdbcDataAdapter())
{
try
{odbcComm.Transaction = trans;
odbcAdapt.SelectCommand = odbcComm;
DataTable dt =
new DataTable();
odbcAdapt.Fill(dt);
connection.Close();
return dt;
}
catch(System.Exception ex)
{
connection.Close();
returnnull;
}
}
}
}
}

Thanks
Matt
 
Back
Top