PRB: DAO OpenRecordset Hangs if Table and Index Name Are Over 63 Characters (251203)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q251203 SYMPTOMS
Microsoft Visual Basic appears to hang on the OpenRecordset method when opening a Microsoft SQL Server 7.0 table as a dbOpenDynaset when either the table name or the combination of the table name and any index name is longer than 63 characters.
If you launch Task Manager, the VB6.exe process uses approximately 99 percent of the processor time (on a single processor machine) and allocates memory quickly.
RESOLUTION
Either of the following are workarounds for the problem:
- Rename the SQL Server table or index so that the combination of names is 63 characters or fewer.
Open the recordset with dbOpenSnapshot or dbOpenForwardOnly instead of dbOpenDynaset. - Open the recordset with dbOpenSnapshot or dbOpenForwardOnly instead of dbOpenDynaset.
Both workarounds are illustrated in the code below.
Modification Type: | Minor | Last Reviewed: | 4/22/2003 |
---|
Keywords: | kbBug kbDatabase kbprb KB251203 kbAudDeveloper |
---|
|