General information
Category:
COM/DCOM and OLE Automation
Title:
Passing ADO connection to COM+
I am having a problem when I pass an ADO connection object to a VFP COM object. If the client app is running on W2K, everything works fine. However on NT clients, when the application passes the connection object to the COM object, the COM object returns the following error when it tries to assign the connection to the recordset object:
Arguments are of the wrong type, are out of acceptable range, or are in conflict with another...1429
Here is the portion of the code in the COM object that is causing the problem
LPARAMETERS loConnection AS Object
LOCAL loRecordSet
* Create the recordset to return
loRecordSet = CREATEOBJECT('ADODB.RecordSet')
WITH loRecordSet
.CursorType = ADOPENDYNAMIC
.LockType = ADLOCKOPTIMISTIC
.ActiveConnection = loConnection * This line causes the error
.CursorLocation = ADUSECLIENT
ENDWITH
RETURN loRecordSet
All machines have MDAC 2.7 installed, and the COM server machine is running W2K Server.
Are objects passed differently on NT and W2K machines?
Thanks for your help
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only