Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Database Timeout
Mon, Apr 23 2007 4:14 PMPermanent Link

wilywit
Hello,

I'm working with a vendor who uses your DBISAM database. I'm connecting via your ODBC product through .net 2.x. The vendor tells me that inactivity
will cause the database to timeout, so I can't leave me connection open for long periods. So, I tried to duplicate this so I can see what error message is
thrown. However, I can't seem to make it error!

I can open an ODBC connection, then go to Server Administrator and disconnect the session. Then, I let my app continue, and it somewhow seems to
reconnect! I go back and look iin Server Administrator and the connection is back again.

Does the ODBC driver take care of this somehow or am I not duplicating the test correctly?
Tue, Apr 24 2007 4:24 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Hi,

I monitor the connection via the "StateChange" event, something like the following in C# and .NET 2.0

Init()
{
  Connection.StateChange += new System.Data.StateChangeEventHandler(ConnectionStateChange);
  ConnectionStatusLabel.Text = " Connection : " + Info.Connection.State.ToString();
}

private void ConnectionStateChange(object sender, StateChangeEventArgs e)
{
  ConnectionStatusLabel.Text = " Connection : " + e.CurrentState.ToString();

  if (e.CurrentState == ConnectionState.Closed || e.CurrentState == ConnectionState.Broken)
    ConnectionStatusLabel.BackColor = Color.Red;
  else
    ConnectionStatusLabel.BackColor = SystemColors.ControlLight;
}

Chris Holland
SEC Solutions Ltd.

wilywit wrote:
> Hello,
>
> I'm working with a vendor who uses your DBISAM database. I'm connecting via your ODBC product through .net 2.x. The vendor tells me that inactivity
> will cause the database to timeout, so I can't leave me connection open for long periods. So, I tried to duplicate this so I can see what error message is
> thrown. However, I can't seem to make it error!
>
> I can open an ODBC connection, then go to Server Administrator and disconnect the session. Then, I let my app continue, and it somewhow seems to
> reconnect! I go back and look iin Server Administrator and the connection is back again.
>
> Does the ODBC driver take care of this somehow or am I not duplicating the test correctly?
>
Wed, Apr 25 2007 8:20 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< I'm working with a vendor who uses your DBISAM database. I'm connecting
via your ODBC product through .net 2.x. The vendor tells me that inactivity
will cause the database to timeout, so I can't leave me connection open for
long periods. So, I tried to duplicate this so I can see what error message
is thrown. However, I can't seem to make it error!

I can open an ODBC connection, then go to Server Administrator and
disconnect the session. Then, I let my app continue, and it somewhow seems
to reconnect! I go back and look iin Server Administrator and the connection
is back again.

Does the ODBC driver take care of this somehow or am I not duplicating the
test correctly? >>

DBISAM automatically re-connects as necessary to the server, even if the
session has been disconnected.  The only way to cause a re-connection error
is to remove the session completely from the database server.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image