We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

ASP XML Recordset to COM Object

surfsista9
surfsista9 asked
on
Medium Priority
281 Views
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.
Comment
Watch Question

Commented:
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).

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Leo EikelmanDirector, IT and Business Development

Commented:
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.

cheers,

Leo

Author

Commented:
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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.