Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass ADO recordset to VFP dll
Message
From
07/08/2002 09:32:35
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00686572
Message ID:
00687012
Views:
69
Hi Evan

My problem was with using PEMSTATUS to try and check if the object was an ADO recordset.

I neither need nor want any third party classes.

>Hi Mike,
>
>I pass recordsets between VFP DLL's all the time. I've developed some VMP classes that might assist you in this endeavor. Let me know privately or send an email to evan@flextech.net if you would like to take a look at them.
>
>Evan Pauley
>
>
>>Hi!
>>
>>I had hoped I could ...
>>
>>1) Create an ADO record set in Excel or VFP and store it to a variable
>>loAdo = CreateObject("ADODB.RecordSet")
>>
>>2) Call upon a method of a DLL made in VFP passing the ADO variable to fill in the ADO record set. This is the call I'm making in VFP...
>>loProcessor = CreateObject("mydll.myobject")
>>
>>Inside ProcessData I...
>>
>>LPARAMETERS toADO
>>IF NOT PEMSTATUS(toADO,"CURSORTYPE",5)
>> RETURN .F.
>>ENDIF
>>
>>So after all of this, the following prints a .F. on the screen
>>
>>?loProcessor.ProcessData(@loADO)
>>
>>Prior to calling loProcessor.ProcessData, loADO does have a cursortype property.
>>
>>Observation indicates that inside ProcessData, toADO is no longer an ADO recordset.
>>
>>Checking loADO after the ProcessData call shows that loADO is an object, but it no no longer has a cursortype property.
>>
>>COM is quite new to me. This works totally fine, when I don't compile the stuff into myDLL.dll
>>
>>What am I missing?
>>
>>Thanks!
Previous
Reply
Map
View

Click here to load this message in the networking platform