[
Lists Home |
Date Index |
Thread Index
]
I've another question guys.I'm sure it's not at all
tough for people on the mailing list but I'm a new
birdie.
I'm trying to pull the data from access database into
some xml document.I've my stylesheet ready so I can
link it later with my xml document once it gets
imported from the access database.Here is my code.
<%@LANGUAGE="VBSCRIPT"%>
<%Response.ContentType = "text/xml"%
<xml version="1.0" ?>
<GrantNets>
Dim conn as Connection
Dim grRS as Recordset
Dim rdataXML as DOMDocument
Dim rdataFilter as DOMDocument
Dim grantXML as DOMDocument
Dim lngHandout Number As Long
Dim lngIssue Number As Long
Dim lngProgram Number As Long
Dim strSponsor As String
Dim strCategory As String
Dim strURL As String
Dim strProgram As String
Dim strDescription As String
Dim dtmDeadline As Dates
Set conn = New Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=H:\My Documents\puja\XML\Grantnet.mdb;Persist
Security Info=False"
Set grRS = New Recordset
grRS.Open "SELECT GrantNet.Handout Number,
GrantNet.Category, GrantNet.Program,
GrantNet.Description,GrantNet.URL,GrantNet.Deadline
Dates FROM GrantNet", conn, adOpenStatic
set grantXML=new DOMDocument
grRS.save grantXML,adPersistXML
Do While Not (grRs.EOF)
strHandout Number = grRs("Handout Number")
strCategory = grRs("Category")
strProgram = grRs("Description")
strURL = grRs("URL")
dtmDeadline = grRs(Deadline Dates")
<GrantNet>
<Handout Number><% =strHanout Number %></Handout
Number>
<Category><% =strCategory %></Category>
<Program><% =strProgram %></Program>
<Description><% =strDescription %><Description>
<URL><% =strURL %></URL>
<Deadline><% =dtmDeadline %></Deadline>
</GrantNet>
<%
grRs.MoveNext
Loop
grRs.Close
Set grRs = Nothing
conn.Close
Set conn = Nothing
%>
</GrantNets>
I saved it as .asp and when I try to open it in the
web browser,it doesn't open as an xml document.It just
opens as a text file.I've no clue what to do with
this.Can I get some help.
Regards,
Puja.
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
|