Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More XML Questions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
More XML Questions
Divers
Thread ID:
00983749
Message ID:
00983749
Vues:
61
I posted some messages a few days ago along these lines, and I've
take a few days to consider the reponses. I've received some excellent
feedback from experts like Craig Bernston and others.

I want now to generalize my needs and ask a few more questions to see
if I can get a few 'holes' plugged.


Overview

I am going convert an existing VFP application to .Net. I want this to
be a phased approach, using a 3 tiered design, with UI, BizObjects
and Data Layers.

I want to approach it in 3 steps:

a) Convert the VFP database to return data as XML from stored procedures.
While this goes against what Craig recommended, the more I think about it,
I might later tune the .Net version to hit the VFP DB first using stored
procs, then convert the DB to SQL. (Craig recommended creating a data
class that has methods that execute SQL's and return the results as
XML strings)

This all in mind, I might create stored procs, then wrapper stored
procedures around those that converts the results to XML and returns
the string. When the app is converted to .Net, I can simply remove the
wrapper SP's.

b) Create the necessary BO's in VFP to call the wrapper stored procedures
and return the resulting XML strings to the UI, and return changes from the
UI to the DB.

c) Modify the UI to query the BO's for data access.


So, assuming the above, the application must perform the following steps:

1) GUI requests data from the BizObj
2) BizObj requests data from the Data Layer
3) Data Layer runs the required stored procedure, converts the results
to XML, and returns the XML string to the BO.
4) The BO returns the XML string to the GUI.
5) GUI converts the XML to table and binds the data to the interface controls.

When changes are to be saved:
1) GUI converts the changed records to XML
2) GUI passes XML string to the BO
3) BO validates changes and passes XML string to the data layer
4) Data layer saves changes to the tables.

Now for the questions.

1) Can I simply do a SQL SELECT and CURSORTOXML()? Any reason this
won't work in light of my plans?

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?

3) Can someone provide an example of how to update the base table
from a modifed set of data represented as an XML string?

Thanks for all your input!
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform