I found the response by TRegan to the recent "Client Server over the
internet" post very interesting. I have never seen this approach before
and my seach of my MSDN DVD did not turn up any documentation either on
this technique. Could anyone please tell me where I might find more
documentation related to the technique discussed in the 8/23/01 response?
I did give the suggested method a try in a current application I am
working on that uses MS-Access97 forms for the front-end and a MS-SQL
Server 7.0 database for the backend. My attempt was on my intranet using
IIS as the web server. However, I have not been successful. As I step
through the VBA code an error occurs on the .Open line and as best as I
can tell the actual error occurs in the ASP page on the very last line -
response.write stm.readtext(adReadAll).
Here is the code snippet in my form.
....
Dim rs As ADODB.Recordset
Dim strSQL As String
Set rs = New ADODB.Recordset
With rs
.Source = "http://localhost/begasp/test.asp"
.ActiveConnection = "Provider=MSPERSIST"
.CursorType = adOpenStatic
.LockType = adLockReadOnly
.Open
.ActiveConnection = Nothing
End With
........
Here is code in test.asp.
<%@ Language="VBScript"%>
<%
dim cn
dim rs
dim stm
dim strSQL
set cn = Server.CreateObject("ADODB.connection")
set rs = Server.CreateObject("ADODB.Recordset")
set stm = Server.CreateObject("ADODB.Stream")
cn.Provider = "SQLOLEDB"
cn.ConnectionString="Server=DELL;Database=TestFXV;user id=sa;password="
cn.Open
strSQL = "SELECT ListOrder, QCStageType FROM WOGridMapQCStageTypesLU ORDER
BY ListOrder"
set rs = cn.execute(strSQL)
rs.save stm, adPersistXML
response.write stm.readtext(adReadAll)
%>
Any further help would be greatly appreciated and in particular I would
really appreciate if anyone could point me to documents that discuss this
technique in more detail.
Thanks,
Frank