PRB: "Command Time Out" Property Does Not Work (188858)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
This article was previously published under Q188858 SYMPTOMS
Setting the Recordset's dynamic Command Timeout Property does not time out the query.
RESOLUTION
One workaround for this problem is to switch the cursor from adUseClient to
adUseServer.
If adUseClient is necessary, another workaround is to use a Command object
as the source of the Recordset and use the Command object's CommandTimeout property, for example:
'Assuming a connection object has been established
With oCm
Set .ActiveConnection = oCn
.CommandText = "select * from authors"
.CommandType = adCmdText
.CommandTimeout = 10
End With
With oRs
.CursorLocation = adUseClient
.Open oCm
End With
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 3/2/2005 |
---|
Keywords: | kbBug kbDatabase kbpending kbprb KB188858 kbAudDeveloper |
---|
|