ACC2: ODBCTimeout Ignores MSACC20.INI ODBC Setting (113883)
The information in this article applies to:
This article was previously published under Q113883 SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.
The ODBCTimeout property in new queries defaults to 60 seconds, regardless
of the value set in the [ODBC] section of your MSACC20.INI file.
In databases converted from Microsoft Access version 1.x, the ODBCTimeout
property defaults to 0, regardless of the value set in the [ODBC] section
of your MSACC20.INI file.
RESOLUTION
You can use the sample subprocedure listed below to set the ODBCTimeout
property for all the queries in your database. Note that the ODBCTimeout
property is ignored in queries that do not use attached tables.
Sample Subprocedure
Sub ChangeAllQueryTimeOuts (timeinterval As Integer)
Dim db As Database, qd As QueryDef, i As Integer
Set db = dbengine.workspaces(0).databases(0) 'Use current database.
BeginTrans 'Start a transaction.
'Loop through Querydefs and change the
'ODBC timeout.
For i = 0 To db.querydefs.count - 1
Set qd = db.querydefs(i)
qd.odbctimeout.value = timeinterval 'Set ODBC timeout.
Next i
CommitTrans 'Finished: commit the transaction.
db.querydefs.Refresh 'Update the Querydefs collection.
End Sub
How to Run the Subprocedure
To run the ChangeAllQueryTimeOuts subprocedure, type the following
in the module's Immediate window, and then press ENTER:
ChangeAllQueryTimeOuts <time value>
Substitute a value, in seconds, for <time value> in the sample line above.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access version
2.0. We are researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
REFERENCES
For more information about the ODBCTimeout and QueryTimeout settings,
search for "ODBCTimeout" and "QueryTimeout" using the Microsoft Access Help
menu.
Modification Type: | Major | Last Reviewed: | 11/6/2000 |
---|
Keywords: | kbbug kbusage KB113883 |
---|
|