Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and .NET Data Comparison
Message
From
16/01/2006 05:03:30
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
01080965
Message ID:
01087075
Views:
51
Hi Terry,

I tought that since there are existing functions (VFP7+)
CursorToXml / XmlToCursor, it wld be as simple as calling first one,
getting result, and then converting it back using second one
while VFP wld handle all the rest (converting cursor structure/data into xml shema/stream etc)

Apparently I was completely unaware of complexities involved
when dealing with XML.
Otherwise wld not ask you (or anyone else) to get into something like this.
I really appreciate your effort!

If this is the case, I mean complexity + low speed - then why some people here advice using XML to pass cursors even between vfp session objects and forms?


Thks again Terry
Appreciated.



>>>I have an idea for a "generalized" approach to do that - let me "slap" it together and let's see if it is something that might be helpful.
>>
>>Hi Terry :)
>>It seem that is not all that simple as I tought and wrote in my message ??
>>Did not mean to trouble anyone :( I tought wld be just 5 minutes job to test speed of cursortoxml() with some dummy 2500 records cursor.
>>
>>Thks +++
>Note - Replace the ON ERROR line with :
ON ERROR DO errhand WITH ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
>
>I did it with 2400 records x 50 fields with that snipet I just posted to you.
>
>I forgot you were interest in VFP 6 - but do not worry - just change the EXECSCRIPT() an EVALUATE() to a "macro"
>
>With EXECSCRIPT and EVALUATE I timed the 2400 x 50 parse to an XML and then the parse back into a cursor at about 89 to 90 seconds.
>
>Surprisingly, using VFP macros (&lcUpdate) instead of EXECSCRIPT(lcUpdate), the time was reduced by 7% to about 83 seconds.
>
>Note that the memo fields are turned off - if memos are used there might be parsing errors for CrLfs, etc. If you note in the code (I first tested with a file that had an HTML parameter string in a field (ie an "&"). So before you memos are passed you need to be aware of unhappy XML characters.
>
>To find what character is the problem make "oXML" public. When it errors out, do this:
?SUBSTR(curXML.strXML,oXML.parseError.filepos,1)
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform