Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object vs. array?
Message
 
 
To
25/08/2009 21:09:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01420180
Message ID:
01421150
Views:
50
>>>Hi,
>>>
>>>I am using arrays as way to pass the information from UI to BIZ/DA objects but thinking about changing to objects (using SCATTER/GATHER). In terms of memory use, do objects require more memory?
>>
>>Why not try it the ".NET" way?
>>
>>CursorToXML() and XMLToCursor() can blast a cursor or table to a file or memvar (i.e. string) and back again in no time; e.g.
>>
>>
>>m.foo = ""
>>use MyDbf
>>CursorToXML("MyDbf", "m.foo", 3)
>>XMLToCursor(m.foo, "BOPlenty")
>>browse
>>
>>
>>Note the use of "output format option 3" (attribute centric XML) which uses around 40% less markup than element centric.
>
>The format option 3 has done the following:
>- an integer column containing zeros was interpreted as a logical containing .f.; when I put a two digit number into one of the last rows, it came across as n(2), again not integer. I guess if it had all zeros and then greater and greater numbers approaching the end, Fox would have some work to do adjusting the widths, column type etc.
>- datetime columns came across as c(1) (all fields blank). Then when it wasn't empty, it came as c(19) containing ttoc(value, 3).
>
>IOW, nice if all your data are strings.

Hi Dragan,

I observe the same (odd) phenomenon with Cursor2XML even without parameter 3. That is, some fields change the type in the conversion. Thanks for catching this issue.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform