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.