ACC2: ODBCTimeout Ignores MSACC20.INI ODBC SettingID: Q113883
|
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.
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.
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
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.
The QueryTimeout setting in the [ODBC] section of the MSACC20.INI file
applies only to queries that do not have a setting for the ODBCTimeout
property. If a query's ODBCTimeout property is blank, then the QueryTimeout
setting is used.
An ODBCTimeout value of 0 means that there is no timeout. If the ODBC
server does not respond, the query will never timeout and return control.
In Microsoft Access version 1.x, The QueryTimeout and ODBCTimeout values
are set by the QueryTimeout setting in the [ODBC] section of the
MSACCESS.INI file. This value applies to all the ODBC queries run in the
current Microsoft Access session.
In Microsoft Access version 2.0, these values can differ. Each query can
have its own ODBCTimeout setting.
For more information about the ODBCTimeout and QueryTimeout settings, search for "ODBCTimeout" and "QueryTimeout" using the Microsoft Access Help menu.
Additional query words: odbc attaching \* \* Note that this article is referred to by the SRACCESS \* article SRX950907001315. If you modify or delete this article, \* please make the corresponding changes to that article.
Keywords : kbusage OdbcOthr
Version : 2.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 3, 1999