Command Timeouts?

How do I set the command timeout setting in DA8 for an ADO.NET/ODBC.NET service?

I’m getting an error [ODBC Engine Interface]S1T00 Timeout Expired, and from what I can gather this is due to a ‘command timeout’ setting for ODBC.NET.

Where/how is this set in the da config??

Thanks,
Alan

As there have been no replies, a little more information.

I’ve been googling to see how to change this timeout. It appears that ODBC has a ‘default’ timeout of 30 seconds for commands/queries. this is what I need to change, and apparently this is NOT set via a connection string, as I initially thought. THis needs to be set in the ODBC connection/command itself.

Where/how do I change this for a DA server?

Thanks,

Alan

Hello

DataAbstract service exposes events BeforeExecuteCommand, BeforeExecutingGetDataReader, BeforeProcessChange. These events allow direct access to the System.Data.IDbCommand instance that will be used to perform data access/update operations.

Regards

What I do, in the OnActivate event after setting the connection is this:

var ladoconn:  IDAADOConnection;

    if fConnection.QueryInterface(IDAADOConnection, ladoconn) = 0 then
      ladoconn.CommandTimeout := YourValue;

Unfortunately ADO.NET connections used by Data Abstract for .NET don’t provide a property that sets a default timeout for a command execution, so it is not possibly to directly port this approach to .NET

Regards

Thanks, I wasn’t sure about that (and should have mentioned I wasn’t using the .NET version)

this solution:

var ladoconn:  IDAADOConnection;
if fConnection.QueryInterface(IDAADOConnection, ladoconn) = 0 then
  ladoconn.CommandTimeout := YourValue;

should work for DAD