Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending XML across internet to stored procedure
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01317731
Message ID:
01317809
Vues:
14
You should try to use Command object parameter to avoid problem with quotes. Below is VFP version I tested. It shouldn't be hard to convert it to ASP
#define adLongVarChar      201
#define adParamInput       1                               1

oCon = CreateObject("ADODB.connection")
oCmd = CreateObject("ADODB.Command")

oCon.Open(...)
oCmd.ActiveConnection = oCon

oPar = oCmd.CreateParameter("cXml", adLongVarChar, adParamInput, LEN(strText), strText)
oCmd.Parameters.Append(oPar)

oCmd.CommandType = 4  && Stored Procedure
oCmd.CommandText = [sp_WriteXML(?)]
oRs = oCmd.Execute()
>I ran across an article that demonstrated how to use the MS DOM object to send XML data across the web. I was able to get it working up to a point.
>
>I wrote a simple VFP program that creates the DOM object, creates an XML cursor and sends it to an ASP page. The web page receives the XML object and sends (at least in theory) it's XML string to a VFP stored proccedure where it can be processed.
>
>I know the XML is getting to the ASP page, but it doesn't appear that the stored procedure is geting the XML.
>
>When I run the program, it displays the XML and an error code of 80040e14, with the message: "Command contains unrecognized phrase/keyword."
>
>Is it possible to send XML to a stored procedure as a parameter like this or am I kidding myself?
>
>Here is the VFP program:
>
<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform