ASP XML Recordset to COM Object

Posted on 2006-04-03
Last Modified: 2010-05-18
I need to pass an asp xml recordset to a com object so I can write it out to a remote file server as a text file. (need com+ to run under a service account in order to access a remote server)

Can this be done by setting an rs property in the com object to the xml rs in asp or can I pass it as a parameter in a function call to the com object?

I've tried the function but this fails.

I'm not even sure I can do this. I can pass an xml stream from vb to asp but now need to pass it from asp to vb dll.
Question by:surfsista9
    LVL 15

    Accepted Solution

    You could pass in the XML as a string.
    Create a public string property in the appropriate class of your COM object and pass this the complete XML string from the XML DOM in your ASP page. You could then load this XML string into an XML DOM inside your COM object, and from there re-create the recordset object from the XML DOM.

    Alternatively you could pass the entire XML DOM into the COM object.
    Same process really, except that you have to create a public property of type XML DOM. Then it's simply a matter of recreating the recordset object from the XML DOM.

    > ...or can I pass it as a parameter in a function call to the com object?

    You could do this but, as I mentioned above, I think it makes more sense to pass in data from the ASP page by creating properties in the COM component and using these within the methods of your VB class(es).
    LVL 8

    Expert Comment

    by:Leo Eikelman
    Easiest solution would be:

    Pass the XML as a String parameter to a funcition in the com object.

    Then create a Scripting.FileSystemObject to write the xml string to a file.



    Author Comment

    Gave points to deighc because his answer is closest to the soluiton.

    I passed the rs as a variant to a property and this worked...very easy. did not have to recreate the dom.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now