1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| ' --- Insere la liste des produit dans T_CliCmdDetail ---
' --- envoie de reponce pour debugage --- Facultatif ---
Dim reponce2_xml '--- Facultatif ---
reponce2_xml = "<reponce2_xml>" '--- Facultatif ---
Dim NodeEnfant
For Each NodeEnfant In testNode.childNodes
Dim enfantNode
Dim ProdId
dim ProdLibele
Dim QteCom
Dim PrixHt
Dim idSession
enfantNode = NodeEnfant.FirstChild.nodeValue
ProdId = NodeEnfant.FirstChild.text
ProdLibele = NodeEnfant.FirstChild.NextSibling.text
QteCom = NodeEnfant.FirstChild.NextSibling.NextSibling.text
PrixHt = NodeEnfant.FirstChild.NextSibling.NextSibling.NextSibling.text
idSession = NodeEnfant.FirstChild.NextSibling.NextSibling.NextSibling.NextSibling.text
'--- Facultatif ---
reponce2_xml = reponce2_xml & "<enfantNode>" & enfantNode & "</enfantNode>"& "<ProdId>" & ProdId & "</ProdId>"& "<ProdLibele>" & ProdLibele & "</ProdLibele>"& "<QteCom>" & QteCom & "</QteCom>"&"<PrixHt>" & PrixHt & "</PrixHt>"&"<idSession>" & idSession & "</idSession>"
' --- requette insert ---
requeteStr = "insert into t_cliCmdDetail (CliCmdDetCliCmdId,CliCmdDetprodid,CliCmdDetprodlibelle,CliCmdDetQte,CliCmdDetPuHt,CliCmdDetidsession)"&_
"values ( '" & cliCmdId & "','" & prodId & "','" & ProdLibele & "','" & qteCom & "',convert(float(2),"&prixHt&"),'" & idSession & "') "
' --- execute la requette ---
connection.execute requeteStr
Next
'--- Facultatif ---
reponce2_xml = reponce2_xml + "</reponce2_xml>"
' --- Fin Insertion Produit --- |