Can't obtain ADO recordset from remote site thru XML.

Can't obtain ADO recordset from remote site thru XML.

Post by ruma » Wed, 21 Feb 2007 21:51:52


I have this asp page (clients_to_xml.asp):
<%
Const adPersistXML = 1
Set ObjADORS = Server.CreateObject("ADODB.Recordset")
ObjADORS.Open "SELECT * FROM clients", strConnection
ObjADORS.Save Response, adPersistXML
ObjADORS.Close
Set ObjADORS = Nothing
%>
I put this page to the local IIS and try get this page from MS Access:

Sub Get_XML
Dim rstIn As ADODB.Recordset
Dim fld As ADODB.Field
Set rstIn = New ADODB.Recordset
rstIn.Open "http://localhost/clients_to_xml.asp",
"Provider=MSPersist;", adOpenForwardOnly, adLockBatchOptimistic
Do Until rstIn.EOF
For Each fld In rstIn.Fields
Debug.Print rstIn(fld.Name)
Next fld
rstIn.MoveNext
Loop
rstIn.Close
Set rstIn = Nothing
End Sub

It works fine!

But when I put my clients_to_xml.asp to my remote site I get the error
in line rstIn.Open: "-2147024891: Access is denied"
When I browse http://www.yqcomputer.com/
data in the browser window.
Can I obtain ADO recordset from remote site this way?