Solved

manipulate ADO recordset in Javascript FROM adPersistXML file:  need examples!!!

Posted on 2004-04-02
6
591 Views
Last Modified: 2011-04-14
I have saved XML files to the web server using the adPersistXML feature.  I will place a reference to the XML file in a data island in my page.  I would like to manipulate the XML data as a recordset using the ADO recordset methods in Javascript (or VBScript).  I want to loop through records, specify SQL statements and return record values using various recordset objects.  

I am having a tough time finding examples of using ADO recordsets from XML in script.  Points go to showing the best online resource or examples that move me in the right direction.

Thanks,

Mason
0
Comment
Question by:codeguy
  • 2
6 Comments
 
LVL 15

Expert Comment

by:Timbo87
ID: 10746049
I think you would be better off doing this server side in ASP/ASP.NET.
0
 
LVL 7

Expert Comment

by:brgivens
ID: 10750199

test.asp:

<html>
<head>
</head>
<body>
<%

Dim rs

Set rs = Server.CreateObject("ADODB.recordset")
rs.Open Server.MapPath("fileName.xml"), "Provider=MSPersist"

Do While Not rs.EOF
  Response.Write rs.Fields("fieldName").Value
  rs.MoveNext
Loop

rs.Close

%>
</body>
</html>
0
 

Author Comment

by:codeguy
ID: 10752602
To clarify:

I want to do this client side (without using ASP).  I would prefer to see examples using ADO recordset object in script and not DOM.

Note that I have increased points to 350.  Anyone out there!!!!?!?!?

0
 
LVL 7

Accepted Solution

by:
brgivens earned 350 total points
ID: 10752958
You can't do it client side.  Javascript is not able to access files - its scope is entirely confined to the browser.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

932 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

13 Experts available now in Live!

Get 1:1 Help Now