Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing ADO connection to COM+
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Passing ADO connection to COM+
Miscellaneous
Thread ID:
00587234
Message ID:
00587234
Views:
53
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
Map
View

Click here to load this message in the networking platform