Loading Xml Data returned from the query loaded into recordset 
Author Message
 Loading Xml Data returned from the query loaded into recordset

Hi,

    I have configured a virtual directory on my machine to return the result
from Sql Server 2000 in the xml format.

http://computer8/nwind?sql=SELECT+*+FROM+Customer+FOR+XML+RAW&root=root

This url i have called on the click on the button on my web page.

function Load_onclick()
{

rs = new ActiveXObject("ADODB.Recordset");
xmldoc = new ActiveXObject("Msxml2.DOMDocument");
var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlhttp.open("Get","http://computer8/nwind?sql=SELECT+*+FROM+Customer+FOR+XML+AUTO&root=root",false);
xmlhttp.send();
xmldoc.loadXML(xmlhttp.responsetext);
rs.Open(xmldoc);

Quote:
}

I want this entire returned result to be loaded into a recordset.  

If i am saving a recordset into a response object then the result is smoothly getting loaded into the recordset object.  I know information regarding the header portion of the recordset is missing.  Is there is any way in which i can get the same result from my virtual directory as i am getting by saving the recordset manually.

Thanks in advance.



Tue, 25 May 2004 12:24:34 GMT
 Loading Xml Data returned from the query loaded into recordset


[snip]
Quote:
> If i am saving a recordset into a response object then the result is

smoothly getting loaded into the recordset object.  I know information
regarding the header portion of the recordset is missing.  Is there is any
way in which i can get the same result from my virtual directory as i am
getting by saving the recordset manually.

The only way that I know of that you can do this is to convert the XML
returned by SQL Server into the format used by the Recordset object. You
could probably use XSL to use this.

--
Bryant



Tue, 25 May 2004 15:01:54 GMT
 Loading Xml Data returned from the query loaded into recordset
just curious,
why do u want to get all the information into a recordset (if u already have
the data as XML)?
     u can do pretty much every thing using the XML DOM, as with the
recordset,
also using XML DOM would be more efficient.


Quote:
> Hi,

>     I have configured a virtual directory on my machine to return the
result
> from Sql Server 2000 in the xml format.

> http://computer8/nwind?sql=SELECT+*+FROM+Customer+FOR+XML+RAW&root=root

> This url i have called on the click on the button on my web page.

> function Load_onclick()
> {

> rs = new ActiveXObject("ADODB.Recordset");
> xmldoc = new ActiveXObject("Msxml2.DOMDocument");
> var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

xmlhttp.open("Get","http://computer8/nwind?sql=SELECT+*+FROM+Customer+FOR+XM
L+AUTO&root=root",false);
Quote:
> xmlhttp.send();
> xmldoc.loadXML(xmlhttp.responsetext);
> rs.Open(xmldoc);
> }

> I want this entire returned result to be loaded into a recordset.

> If i am saving a recordset into a response object then the result is

smoothly getting loaded into the recordset object.  I know information
regarding the header portion of the recordset is missing.  Is there is any
way in which i can get the same result from my virtual directory as i am
getting by saving the recordset manually.

- Show quoted text -

Quote:

> Thanks in advance.



Sun, 30 May 2004 03:48:37 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. xml data produced by FOR XML AUTO cannot be loaded with MSXML API

2. Problems loading XML file into an ADO recordset when app is compiled

3. Load generic XML to ado recordset

4. Load Recordset from XML in a String

5. Load XML file to a RecordSet then Update Database using ADO

6. Load Recordset from XML in a String

7. Load XML generated recordset to database

8. ADO Newbie: Saving and loading Recordsets to XML

9. Loading recordset from XML...

10. Problem using Recordset Open method to load XML file in C++

11. loading an XML file as an ADO recordset (possibly using DOMDocument) in Visual Basic

12. ADO update of recordset loaded from dynamically-generated XML


 
Powered by phpBB® Forum Software