Simple XML Example

J

James Baker

I have a very simple query that gets a few records from a database. I need
to take this, turn it into XML and post it to a client's website via
VBScript. I was able to find an example of exporting the data to an XML
file, but I'm lost on the syntax for actually posting the data to a third
party page. I'm sure this is simple, can someone provide me with an
example? Thanks!

Relevant code currently is:

Response.ContentType = "text/xml"

Dim ObjADORS
Const adPersistXML = 1

Set ObjADORS = Server.CreateObject("ADODB.Recordset")

'FileNumber, ClientFileNo, StatusDate, StatusTime, StatusComment
ObjADORS.Open "SELECT FormType, Description FROM FormTypes",
"DSN=kasecure1;uid=sa;pwd=pcbs"

ObjADORS.Save "c:\inetpub\wwwroot\manager\Test.xml", adPersistXML

ObjADORS.Close
Set ObjADORS = Nothing
 
B

Bob Barrows [MVP]

James said:
I have a very simple query that gets a few records from a database.
I need to take this, turn it into XML and post it to a client's
website via VBScript. I was able to find an example of exporting the
data to an XML file, but I'm lost on the syntax for actually posting
the data to a third party page.

I'm not sure I quite undersatnd what you mean by this, but, does either of
these two examples help?
http://www.davidpenton.com/testsite/tips/

Bob Barrows
 
J

James Baker

I'll take a look, thanks for the links. To clarify, all I'm trying to do is
generate XML from a recordset and "send" it from an ASP page to a client's
website, where they can interpret it however they want. Does that make
sense?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,049
Members
48,769
Latest member
Clifft

Latest Threads

Top