FIX: Field Name Same as Reserved Word Can Cause GP FaultLast reviewed: October 30, 1997Article ID: Q113687 |
3.00
WINDOWS
kbprg kbbuglist
The information in this article applies to: - Standard and Professional Editions of Microsoft Visual Basic for Windows, version 3.0
SYMPTOMSIt is possible to receive a general protection (GP) fault in VB.EXE at the address 0025:3182 when using the data access features of Visual Basic. You may also notice corruption in your source code if the source is saved in the binary format and reloaded. The problem may not occur all the time.
CAUSEThis problem stems from using field names that are reserved words in Visual Basic. The problem occurs when using the following syntax to reference the field:
Recordset![Reserved]where "Recordset" is a table, dynaset, snapshot, or data control recordset, and "Reserved" is any Visual Basic reserved word.
RESOLUTIONTo avoid the problem use the Fields collection to refer to the field. For example:
Recordset.Fields("Reserved").Value Recordset("Reserved")where "Recordset" is a table, dynaset, snapshot, or data control recordset, and "Reserved" is any Visual Basic reserved word.
STATUSMicrosoft has confirmed this to be a bug in Visual Basic version 3.0 for Windows. This problem has been corrected in Visual Basic version 4.0.
Steps to Reproduce Problem
|
Additional reference words: buglist3.00 3.00 fixlist4.00 GPF
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |