[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML and Access databases

Subject: XML and Access databases
From: puja thakral <puja_thakral@xxxxxxxxx>
Date: Mon, 6 Oct 2003 09:15:22 -0700 (PDT)
xml to access database
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

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.