Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dumb xmladapter or Dumb me
Message
From
26/06/2003 15:36:09
 
 
To
26/06/2003 14:25:59
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00803232
Message ID:
00804395
Views:
36
Sorry, the email which I sent yesterday got "stuck" in my outbox! You should have the email now.

This code we are discussing is a method in a generic class for transporting cursors from one system to another. If it is necessary to "program for the data" then it is less valuable as a class. However, I may need to subclass for only this table although I will try not to.

I will test the code sample which you have provided and see if I can implement this code into my base class.

Please let me know what you find with the data which I sent you.

Thanks

Glenn


>>May I email the DATA to you? It is very awkward to deliver the schema and data by way of th UT. I can deliver the schema in this format but I would ha a difficult time with the data.
>>
>
>Hi Glenn,
>
>I've not received table schema and data from you.
>Any way, have you tried to map the field to binary XML type?
>Here is the code that shows how to do this:
>
>
>CLOSE DATABASES all
>CLEAR
>SET MEMOWIDTH TO 150
>
>CREATE CURSOR foo (cb c(1) NOCPTRANS)
>INSERT INTO foo VALUES (CHR(15))
>
>LOCAL oXA as XMLAdapter, oXF as XMLField
>
>oXA=CREATEOBJECT("XMLAdapter")
>oXA.AddTableSchema("foo",.T.)
>
>oXF=oXA.Tables(1).Fields(1)
>
>oXF.XSDtype=""
>oXF.IsBinary=.T.
>oXF.DisableEncode=.F.
>
>oXA.ToXML("cXml",,.F.)
>
>?cXml
>
>oXA=null
>oXF=null
>
>oXA=CREATEOBJECT("XMLAdapter")
>oXA.LoadXML(cXml,.F.)
>
>oXF=oXA.Tables(1).Fields(1)
>
>oXF.DataType="C"
>oXF.NoCpTrans= .T.
>oXF.DisableEncode=.F.
>
>oXA.Tables(1).ToCursor(.F.,"foo1")
>
>SELECT foo1
>DISPLAY STRUCTURE
>GO top
>?ASC(cb)
>
>return
>
>
>Does it solve the problem?
>
>Thanks,
>Aleksey.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform