Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create a cursor based on variables in memory
Message
From
04/02/2003 15:49:28
 
 
To
04/02/2003 15:43:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00749040
Message ID:
00749056
Views:
25
Sortof... You are close to what I need it for. I don't need to grab every variable in memory actually, but grabbing a range like in the 'SAVE TO memory.sav ALL LIKE mpo*' command but using it create a table would be terrific.

Tracy

>Oh, I see...I thought you wanted one record for each variable. You want a field every variable? What if you have more than 255 variables? I guess you need to redesign your app in that case *grin*
>
>That would be a pain...you would have to read through the resulting text file, create an array holding all the variable names, types, and values, and create a long create cursor command, then iterate through the array to assign the values to the fields.
>
>Is this for an error routine?
>
>>But how to create the table to begin with? I'd have to look at everything in memory and see the type of data in the variable, the size, etc and then manually 'create cursor ...' right? I wish there was a better way! I'd like to take all variables in memory and create a table that has the same field names as the variable names (and arrays) and gather into it... oh well, I guess I was dreaming!
>>
>>Tracy
>>
>>>Hey Trace,
>>>
>>>The only way I can think is to LIST MEMORY TO FILE < filename > NOCONSOLE , and import the file into a table.
>>>
>>>>Anyway to create a temporary cursor that matches all variables in memory without knowing the variable names, type, and contents beforehand?
>>>>
>>>>TIA,
>>>>Tracy
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform