This is the first file which captures all the records from database table into the a .rst file. This is hosted on one server.
<%set con=server.createobject("ADODB.connection")
con.open "DSN=dsnname;UID=uid;PWD=pwd;"
set rs=server.createobject("ADODB.recordset")
rs.cursorlocation=adUseClient
rs.cursorType=adOpenStatic
rs.LockType=adLockBatchOptimistic
rs.open "select * from myTable" , con
rs.save "c:/try/myfile.rst", adPersistXML
set rs = nothing
%>
The second file hosted on different server accesses all the records from the .rst file and displays them.
<%set rs=server.createobject("ADODB.recordset")
rs.open "c:/try/myfile.rst"
'For web address it will be
'rs.open "http://www.myfirstserver.com"
while not rs.EOF
response.write(rs("id") & " " & rs("name") & "<br>")
rs.MoveNext
wend
%>
I know accessing the data from different server is possible through xml but this method works when both files are on same server.
Problem arises only for two different servers.