Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incompatibility between schemas
Message
From
11/01/2006 13:32:58
 
 
To
11/01/2006 10:30:36
General information
Forum:
ASP.NET
Category:
XML
Miscellaneous
Thread ID:
01085488
Message ID:
01085764
Views:
14
Dave,

Probably a better answer than mine. <g>

~~Bonnie



>Michel,
>
>>But, if I use .NET code only to generate that same data in a dataset and look at the schema, I have this...
>>So, doing the same in VFP, with XmlToCursor(), gives an incorrect structure as I end up with a memo field in the name field. How can I have .NET to have the proper schema?
>
>This is a known problem with the brain-dead default settings for XML output from a dataset. Rick Strahl's paper at http://www.west-wind.com/presentations/foxpronetwebservices/foxpronetwebservices.asp explains that you need to add this setting to your dataadapter before generating the XML output:
Adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
This change will force .NET to include column lengths in the schema and XMLToCursor() can than create a correct cursor without the annoying memos.
>
>Alternatively, you can on the VFP side use CREATE CURSOR to create a cursor in the exact format you want and then use the 8192 flag on XMLToCursor() to indicate that the cursor name you provide is an existing cursor and is not to be created, but is to have the records appended into it.
>
>Also, you could use VFP9's XMLAdapter with code to change the XMLField object properties for data type, length and precision after the LoadXML call, but that's more complex to do than just using XMLToCursor with a pre-existing cursor and 8192.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform