Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wow a VFP Record Object
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00267234
Message ID:
00268352
Views:
30
>>>Didn't get to it yet. I teach an ASP class Monday and Wednesday nights and sometimes get just too tied up. Hopefully tonight. But you are on the right track (or at least the track I was going to pursue. Pass the SQL statement to an object, execute the statement in the object to save the data to an array. Provide methods to access a record (row), like MoveFirst, MoveLast, MoveNext, MovePrevious, etc. Events to DELETE, ADDNEW, etc. just like ADO, but using an object that contains the data as an array.
>>>
>>>Mike
>>
>>But is it really necessary? You can pass the object with the array somewhere and then convert the array to the cursor again, and use the native FoxPro commands for processing, right?
>>
>>Nick
>The trick is converting the array back to a cursor again. Unless I'm forgetting something (entirely possible), you need to somehome determine the file structure of the cursor coming into the object. Store that structure and then use it again when recreating the array.
>

It is probably not a big deal. We can use AFIELDS() to get the cursor structure into another array property and then CREATE FROM ARRAY and populate the cursor from the another array property which contains data. (Didn't test it yet though.)

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform