G
Guest
So, I am getting this really annoying error.. the SQL Statement executes
perfectly in Query Analyzer.. all I am doing is basically duplicating a row
(insert into select from) from one table back into itself. This is so that
people can duplicate a report definition and then edit.. Basically i store
the XMLDATA property of the OWC in a SQL table and have a couple of pages
for finding report defs.. not too complex..
Error Type:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/epo2/page7_5.asp, line 85
This code is cut and paste from dreamweaver; i sure as heck couldn't get the
command working.. but I'm not going to make major changes to any of this.. I
just need to know why it isn't working.
And I'm doing this via SQL authentication.. I am going to protect against
SQL injections once i troubleshoot this problem (I removed most of that
stuff to troubleshoot)
<!--#include file="TOP.asp" -->
<%
Dim rstDuplicate__OLDDEFID
rstDuplicate__OLDDEFID = "1"
If (request("DEFID") <> "") Then
rstDuplicate__OLDDEFID = request("DEFID")
End If
%>
<%
Dim rstDuplicate__ENTEREDBY
rstDuplicate__ENTEREDBY = "AARKEM"
If (session("ALIAS") <> "") Then
rstDuplicate__ENTEREDBY = session("ALIAS")
End If
%>
<%
Dim rstDuplicate
Dim rstDuplicate_numRows
Set rstDuplicate = Server.CreateObject("ADODB.Recordset")
rstDuplicate.ActiveConnection = MM_SQLMAIN_STRING
rstDuplicate.Source = "EXEC SPDUPLICATERPTDEF " &
cstr(rstDuplicate__OLDDEFID) & ", '" & rstDuplicate__ENTEREDBY & "'"
rstDuplicate.CursorType = 0
rstDuplicate.CursorLocation = 2
rstDuplicate.LockType = 1
rstDuplicate.Open()
perfectly in Query Analyzer.. all I am doing is basically duplicating a row
(insert into select from) from one table back into itself. This is so that
people can duplicate a report definition and then edit.. Basically i store
the XMLDATA property of the OWC in a SQL table and have a couple of pages
for finding report defs.. not too complex..
Error Type:
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/epo2/page7_5.asp, line 85
This code is cut and paste from dreamweaver; i sure as heck couldn't get the
command working.. but I'm not going to make major changes to any of this.. I
just need to know why it isn't working.
And I'm doing this via SQL authentication.. I am going to protect against
SQL injections once i troubleshoot this problem (I removed most of that
stuff to troubleshoot)
<!--#include file="TOP.asp" -->
<%
Dim rstDuplicate__OLDDEFID
rstDuplicate__OLDDEFID = "1"
If (request("DEFID") <> "") Then
rstDuplicate__OLDDEFID = request("DEFID")
End If
%>
<%
Dim rstDuplicate__ENTEREDBY
rstDuplicate__ENTEREDBY = "AARKEM"
If (session("ALIAS") <> "") Then
rstDuplicate__ENTEREDBY = session("ALIAS")
End If
%>
<%
Dim rstDuplicate
Dim rstDuplicate_numRows
Set rstDuplicate = Server.CreateObject("ADODB.Recordset")
rstDuplicate.ActiveConnection = MM_SQLMAIN_STRING
rstDuplicate.Source = "EXEC SPDUPLICATERPTDEF " &
cstr(rstDuplicate__OLDDEFID) & ", '" & rstDuplicate__ENTEREDBY & "'"
rstDuplicate.CursorType = 0
rstDuplicate.CursorLocation = 2
rstDuplicate.LockType = 1
rstDuplicate.Open()