I can get remote scripting to work fine, returning strings from a server ASP
page to the browser client asp page, but it fails when the server page tries
to connect to a database. The failure occurs when the server page tries to
connect (to SQL) using ADO with either Recordset, Command, or Connection.
On normal ASP pages I have no problems accessing a database. The error
that pops up is:
Remote Scripting Error: Page invoked does not support Remote Scripting
I have Visual Interdev 6. I have tried loading VI service pack 3, but that
didn't help. Can you?
Here is the code from the CLIENT
<%@ Language=VBScript %>
<% ' VI 6.0 Scripting Object Model Enabled %>
<!--#include file="_ScriptLibrary/pm.asp"-->
<% if StartPageProcessing() Then Response.End() %>
<FORM name=thisForm METHOD=post>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function btnSaveData_onclick() {
retObj = SaveFormData.execute.SaveData(3);
}
//-->
</SCRIPT>
<P> </P>
<P><INPUT type="button" value="Save data" name=btnSaveData
LANGUAGE=javascript onclick="return btnSaveData_onclick()">
<P> </P>
<Comment> The page object went here, but I took it out for brevity in this
newsgroup post </Comment>
</BODY>
<% ' VI 6.0 Scripting Object Model Enabled %>
<% EndPageProcessing() %>
</FORM>
</HTML>
-------------
Here's the code from the SERVER
<%@ Language=VBScript %>
<% ' VI 6.0 Scripting Object Model Enabled %>
<!--#include file="_ScriptLibrary/pm.asp"-->
<% if StartPageProcessing() Then Response.End() %>
<FORM name=thisForm METHOD=post>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<Comment> The page object went here, but I took it out for brevity in this
newsgroup post </Comment>
<%
Function SaveData(selBranch)
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open Application ("conPCQ_ConnectionString")
set RSClient = conn.Execute("SELECT * from Client")
' ERROR HAPPENS on above line.
End Function
%>
<P> </P>
</BODY>
<% ' VI 6.0 Scripting Object Model Enabled %>
<% EndPageProcessing() %>
</FORM>
</HTML>
var objDB;
var rs;
objDB = Server.CreateObject("ADODB.Connection");
objDB.Open("Driver={SQL
Server};Server=sname;UID=uid;PWD=pwd;WSID=;Language=us_english;DATABASE=dbas
e;DSN=;")
rs = Server.CreateObject("ADODB.Recordset");
rs.Open("Product", objDB);
Randy Peterson <Randy.P...@ec.NOSPAM.gc.ca> wrote in message
news:Oi2KorSl$GA....@cppssbbsa02.microsoft.com...
> file://-->
retArray[0] = rs.fields("ProdDesc");
It works fine if I do
retArray[0] = "Bogus"
Got any suggestions?
Thanks
Angie Benson <angie....@card-plus.com> wrote in message
news:e#59Wt7r$GA....@cppssbbsa02.microsoft.com...
--
Michael Harris
MVP Scripting
"Angie Benson" <angie....@card-plus.com> wrote in message news:#yQ8aE8r$GA.228@cppssbbsa03...