>
>1) Can I simply do a SQL SELECT and CURSORTOXML()? Any reason this
>won't work in light of my plans?
Keep in mind that CURSORTOXML() and vice-versa don't work with hierarchical data. My rule has always been to not combine data into a single cursor for data entry/display. Only combine data into a single cursor when it makes sense for reporting. Other than that, you can do what you're asking.
>
>2) If I have a stored proc that performs a SQL query and returns
>the results as XML, can I later reconvert only the changed records
>to XML and pass them back to be saved, or do I need all records?
CURSORTOXML() converts all the records unless specified differently by the nRecords parameter. However, that doesn't let you pick and choose which records you want. You'll also need some way to tell which records were changed. If can do that, just delete the unchanged records in the cursor, SET DELETED ON, then call CURSORTOXML().
>
>3) Can someone provide an example of how to update the base table
>from a modifed set of data represented as an XML string?
One way:
1. CURSORTOXML()
2. Pass cursor from BO to DO.
3. XMLTOCURSOR()
4. SCAN the cursor
5. For each record in the cursor, UPDATE Table SET Table.Field1 = Cursor.Field1 WHERE Table.Pk = Cursor.Pk
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer