Can"t obtain ADO recordset from remote site thru XML.
am 20.02.2007 13:51:52 von rumaxI 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://my_remote_site.com/clients_to_xml.asp I get xml
data in the browser window.
Can I obtain ADO recordset from remote site this way?