Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Schema not loading from VFP Table
Message
From
01/02/2007 13:14:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Title:
Schema not loading from VFP Table
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01191494
Message ID:
01191494
Views:
84
Greetings!

From VFP8 I am trying to load a SQL Server 2000-generated DataSet into a VFP cursor via a .NET Web Service. Calling the web service and returning the dataset works perfectly fine...except for one thing.

The cursor gets created with all data types set to MEMO fields for string valued import fields.

According to Rick Strahl and Cathi Gero (I've been to both of their web sites and have studied their information extensively), once you have a dataset, you can force VFP to use a XSD schema based on an open VFP table.

I created a table with the field lengths defined, etc. But, still, the XML does NOT show this in the schema that is included in the XML file generated?

Here's the code AFTER I have successfully retrieved the data via the .NET web service. The dataset object is stored in object loNL:

*** Grab the XML - should be a dataset
loDOM = loNL.item(0).parentNode
lcXML = loDOM.Xml

* ShowXML(lcXML)

LOCAL oXA AS XMLADAPTER
oXA = CREATEOBJECT("XMLAdapter")

*!* This code doesn't seem to do what I want, that is to format the fields based on XSD restrictions
oXA.UTF8Encoded = .t.
oXA.AddTableSchema("SPLeadLayout")
* oXA.IsDiffgram = .T.

oXA.LOADXML(lcXML,.F.,.T.)

ShowXML(lcXML)

The SPLeadLayout table contains the schema I want to use. But, it does not seem to affect the XML file at all?

Any one have any clues as to what I may be doing wrong?

Thank in advance!


Scott M.
SMART Systems, Inc.
God Bless!

Scott M.
Independent Consultant
Next
Reply
Map
View

Click here to load this message in the networking platform