Hello,
I am writing a project that will be used on my company intranet. They have
one global.asa for the whole intranet so I am unable to use it to open my
database connection. I have written an .inc file to open my odbc. It works
fine with everything except my RDS Objects. I do not know how to connect to
my server. Everything works fine on my personal web server and my machine,
but when I move it to the intranet server my RDS objects no longer work.
The error reads: "The operation requested by the application is not allowed
if the object is closed."
My .inc file contents are:
<% Set oConn = server.createobject("adodb.connection")
oConn.Open "DRIVER={SQL server};
SERVER=CIN112;UID=NADA;PWD=NADA;Database=NADA"
%>
When I connect to my database I just do something like this:
SQLQuery = "SELECT DISTINCT Make FROM VehicleDesc ORDER BY Make"
Set rs_Make = oConn.execute(SQLQuery)
That all works fine. Here is an example of one of my objects:
<OBJECT CLASSID="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33"
ID="Years" width=1 height=1 tabindex=-1>
<PARAM NAME="Server" VALUE="http://<%=Request.ServerVariable
"SERVER_NAME")%>">
<PARAM NAME="Connect" VALUE="dsn=NADA;UID=NADA;PWD=NADA">
<PARAM NAME="SQL" VALUE="SELECT DISTINCT year FROM VehicleDesc WHERE
MAKE ='<%=rs_Make("Make")%>' ORDER BY year DESC">
</OBJECT>
By the way, rs_Make is open. That is not a problem. Does anyone know what
PARAM's I should use or how I should write the code for this object?
Any help, tips, suggestions, or anything would be greatly appreciated!
Thanks!!!
Melody