Click to See Complete Forum and Search --> : Open a Recordset from a received XML file without persist it


Carlos
07-27-2000, 02:36 PM
Hi. I'm sorry, my english is bad.

We are sending a recordset to the server with the XMLHTTP send method. At
the server, we receive the file, persist it and then, we open the recordset
and process it with the followind code.

Do you know how to directly open the received XML data, without persist it
to a file?

(We currently use ADO 2.1 on the server)

Thank you in advance

Carlos Tealdi
Soteica
Argentina

<%
Set RS = Server.CreateObject ("ADODB.RecordSet")
Set oXML = Server.CreateObject ("Microsoft.XMLDOM")

oXML.load(Request)

file = Server.MapPath ("\") & "\Sist1.xml"
oXML.Save(file)

RS.Open file, , adOpenForwardOnly, adLockReadOnly, adCmdFile
Do while
...
Loop
%>

Chris
08-01-2000, 10:39 AM
The only way I know how to do this is using ADO 2.5. Oddly enough we found
the solution to this in the Wrox Press book "Professional Active Server Pages
3.0" (ch11 -- Working with XML data). Since we're using ADO 2.5, we gave
it a go and it works great. Basically, you take the XML load it into an
XMLDom object, then use the ADO.Stream object to feed the XML into a recordset.

"Carlos" <carlost@soteica.com> wrote:
>
>Hi. I'm sorry, my english is bad.
>
>We are sending a recordset to the server with the XMLHTTP send method. At
>the server, we receive the file, persist it and then, we open the recordset
>and process it with the followind code.
>
>Do you know how to directly open the received XML data, without persist
it
>to a file?
>
>(We currently use ADO 2.1 on the server)
>
>Thank you in advance
>
>Carlos Tealdi
>Soteica
>Argentina
>
><%
>Set RS = Server.CreateObject ("ADODB.RecordSet")
>Set oXML = Server.CreateObject ("Microsoft.XMLDOM")
>
>oXML.load(Request)
>
>file = Server.MapPath ("\") & "\Sist1.xml"
>oXML.Save(file)
>
>RS.Open file, , adOpenForwardOnly, adLockReadOnly, adCmdFile
>Do while
> ...
>Loop
>%>
>
>
>