PRB: Error 40041 When Calling RDO Parameters Through User Connection (199128)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q199128 SYMPTOMS
Referencing parameters by name using the User Connection Designer (UCD) generates the following error:
Error 40041 "Object collection: Couldn't find item indicated by text".
The error occurs if the parameter's properties have been viewed in the Query Properties page prior to calling the parameter by name.
CAUSE
When calling parameters by name using UCD or Remote Data Objects (RDO), each parameter's name should be preceded by an "@." When viewing the parameter's properties, the "@" prefix is removed from the parameter name. This causes RDO not to recognize the parameter anymore and error 40041 occurs.
RESOLUTION
There are two ways to work around this behavior: - Once the error 40041 occurs, the only way to work around it is to recreate the UserConnection object.
-or-
- Reference parameters by their position in the parameters collection.
STATUS
This behavior is by design.
REFERENCES
For more information on the connection designer, please refer to the following Microsoft Knowledge Base article: 166281 HOWTO: Create and Implement a UserConnection
Modification Type: | Major | Last Reviewed: | 3/4/2002 |
---|
Keywords: | kbDatabase kbprb kbRDO KB199128 |
---|
|