Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object to Cursor command?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00420504
Message ID:
00420532
Views:
13
I do this and I walk through the collection for each object.

This code looks at a drop down list value to process from:
IF PCList1.COUNT=0
DRs=PCList1.getdatarecords() && will get details as an object
lntotparts = DRs.COUNT
IF lntotparts > 0 && did we get any parts with the filter?
DIME laparts(DRs.COUNT,10)
i=1
FOR EACH dr IN DRs && walk through the object and populate an array. from that arry create a cusror
laparts(i,1)=dr.Manufacturer.CODE
laparts(i,2)=dr.Manufacturer.TEXT
laparts(i,3)=dr.ManufacturerPartNumber
laparts(i,4)=dr.DESCRIPTION
*-- Somtimes price is not good.
IF TYPE('dr.price(0).priceretaillist')='O'
laparts(i,5)=dr.price(0).priceretaillist
laparts(i,6)=dr.price(0).pricecoresell
ELSE
laparts(i,5)= 0
laparts(i,6)=0
ENDIF

HTH

__Stephen




>Is there a VFP6 command to create a cursor from an object ? I've used scatter to an object and now I want to create a temp cursor from that object and then do a gather to put the data in the new temp cursor. This HAS to be done with an object and not just doing the scatter into an array.
>
>Is there a command I'm missing? Or am I just going to have to walk the object and create the cursor manually that way?
>
>- A Hilton
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform