PRB: Clone Won't Support All ListFields & ListIndexes MethodsLast reviewed: December 18, 1995Article ID: Q129286 |
The information in this article applies to:
SYMPTOMSThe ListFields (Dynaset and Snapshot method) and ListIndexes (Table method) used against a Clone created from a RecordSet object will generate the following error with the Microsoft DAO 3.0 Object Library:
Function marked as restricted or uses an OLE type not supported in Visual BasicIf you chose the Microsoft DAO 2.5/3.0 Compatibility Library and used DynaSet, SnapShot or Table objects, the ListFields and ListIndexes method used against a Clone created from a DynaSet, Snapshot, Table, or RecordSet object will generate this error:
Run-time error '3251' Feature not available CAUSEWhen a Clone is created from any type of RecordSet object, the resulting Clone is a RecordSet object -- not the Visual Basic version 3.0 DynaSet, SnapShot, or Table types. It is not dependent on the type of the object from which it was created. Because the Clone is a RecordSet, only RecordSet properties and methods are available.
RESOLUTION
Visual Basic Version 4.0The ListFields and ListIndexes methods are included in Visual Basic version 4.0 for compatibility with earlier versions of Visual Basic. For all RecordSet objects, Microsoft recommends that you enumerate the Fields or Indexes collection of the object containing the fields or indexes you want to list. For Cloned objects, you may need to recode any use of the ListIndexes to enumerate the Fields or Indexes collection of the object. For more information, please see the "Examples of Converting Code to Jet Version 2.5" topic in the Visual Basic version 4.0 Help menu.
Steps to Demonstrate the Correct Alternative to ListFields
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior in Visual Basic
|
Additional reference words: 4.00 vb4win vb4all
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |