Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Create cursor from object

$
0
0
Re: Create cursor from object
FoxPro Programming
Re: Create cursor from object
01/02/2012
12:31:19 AM
3EE014EDZ Show this entire thread in new window
From:
To:
Attachments:
None

You can do that but you have to iterate over the oject members with AMembers and the CREATECURSOR() for each of the fields. Pretty easy to do.

Question is why would you need a cursor if you already have an object with those properties?

+++ Rick ---


Let's say I have created a simple object from Empty, and that I have added sevaral properties (and values) to it. The properties could be Integers, floats, dates, strings, logicals, etc.

Now I want to create a cursor with fields named the same as the properties, and have 1 row in the cursor where the row has the values from the object properties.

Basically, I want a function like this:

CreateCursorFromObject(oMyObject, cCursor)





Rick Strahl
West Wind Technologies

Where do you want to surf today?
Reader Version: 5.0

from Maui, Hawaii



Viewing all articles
Browse latest Browse all 10393