>I am using the CommandTimeout property on an ADO connection in Visual Basic to prevent queries to my FoxPro tables from running too long. This seems to work, but I need a way to determine whether a query ran to completion or timed out. I tried using the ADO event ExecuteComplete, but adStatus is always adStatusOk. I also tried running the query asynchronously (see MS knowbase article
Q190606), but I get the error
Current provider does not support asynchronous execution. Does anyone have an idea or a work around?
>
>Thanks!
Hi Tim,
I have been working with ADO data for a few months now, and reading the platform SDK docs more than I'd like to for ADO object properties and such! From reading the SDK docs about the CommandTimeout property, it seems that you would get a returned error if the command times out. I know this is not what you want, but it seems like you'd know it if it happened. Probably something would show up in the Errors collection of your ADOConnection object.
**snip SDK ADO docs.
Use the CommandTimeout property on a Connection object or Command object to allow the cancellation of an Execute method call, due to delays from network traffic or heavy server use.
If the interval set in the CommandTimeout property elapses before the command completes execution, an error occurs and ADO cancels the command.
If you set the property to zero, ADO will wait indefinitely until the execution is complete. Make sure the provider and data source to which you are writing code support the CommandTimeout functionality.
Might be no help, its just what I have found.
Jim
Jim Newsom
IT Director, ICG Inc.