Solved

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

Posted on 2004-04-02
6
590 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

747 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

12 Experts available now in Live!

Get 1:1 Help Now