Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ado cursoradapter using xml data
Message
De
27/09/2004 15:39:57
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Titre:
Ado cursoradapter using xml data
Divers
Thread ID:
00946405
Message ID:
00946405
Vues:
44
Hi all,

Given that I have a CursorAdapter using ADO to a VFP table. What would be the best way to update data (CalcDeploy) back to the table from an xml file. Note that the primary key data is not provided in the xml file, only the candidate key data is provided. See example:
* VFP Table: WhseProds.dbf (Deploy.dbc)
* Structure: WPID i, Whse c(10), Prod c(10), calcDeploy i
* where: WPID = primary key; whse+prod = candidate key
* This is the source data in xml format and does not use XSD.
<DeployData>
  <WhseProd Whse="W0" Prod="P1" CalcDeploy="100" />
  <WhseProd Whse="W0" Prod="P2" CalcDeploy="200" />
  <WhseProd Whse="W0" Prod="P3" CalcDeploy="300" />
  <WhseProd Whse="W1" Prod="P1" CalcDeploy="100" />
  <WhseProd Whse="W1" Prod="P2" CalcDeploy="200" />
  <WhseProd Whse="W1" Prod="P3" CalcDeploy="300" />
</DeployData>
My current implementation is:
1. create a cursoradapter with select & update settings using ADO.
1.1 selectcmd has parameters ?cWhse & ?cProd
2. load the xml to a dom object.
3. for each element attribute combination of Whse + Prod, I
would issue a cursorfill() and sendupdates=.t.

This process seems to me as very kludgy. Is there a better way
to do it?
ramil
~~ learning to stand still
Répondre
Fil
Voir

Click here to load this message in the networking platform