Hi there I need help with this
I get this error
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/MCERegister/_ScriptLibrary/Recordset.ASP, line 762
I am using a dtc recordset control on my page that is using a SQL stored procedure as its source. I am using SQL Server 2000. I thought it might be due to not have set nocount on but I have it set on and I still get this error. When I run the execute the procedure alone the procedure works great. But when I connect to it through a dtc recordset on my asp page I get the above error.
The SQL is as follows.
Alter Procedure stpInsertMemberStatus
/*
This procedure is adding new member status's to tblMemberStatus
*/
(
@nUserID int,
@nAssociationID int,
@nTermID int,
@nPassed bit
)
AS
set nocount on
DECLARE @ReturnedUserID int,@ReturnedAssociationID int,@ReturnedTermID int,@ReturnedPassed bit
Select @ReturnedUserID=msUsID,@ReturnedAssociationID=msAsID,@ReturnedTermID=msTermID,@ReturnedPassed=msPassed from tblMemberStatus
where msUsID=@nUserID and
msAsID=@nAssociationID and
msTermID=@nTermID
If (@ReturnedUserID is Null or @ReturnedUserID='') and @nUserID<>'0'
Begin
INSERT INTO tblMemberStatus (msUsID,msAsID,msTermID,msPassed)
VALUES (@nUserID,@nAssociationID,@nTermID,@nPassed)
End
Else If @nPassed <> @ReturnedPassed
Begin
UPDATE tblMemberStatus SET msPassed=@nPassed WHERE
msUsID=@nUserID and
msAsID=@nAssociationID and
msTermID=@nTermID
End
I get this error
ADODB.Recordset (0x800A0E78)
Operation is not allowed when the object is closed.
/MCERegister/_ScriptLibrary/Recordset.ASP, line 762
I am using a dtc recordset control on my page that is using a SQL stored procedure as its source. I am using SQL Server 2000. I thought it might be due to not have set nocount on but I have it set on and I still get this error. When I run the execute the procedure alone the procedure works great. But when I connect to it through a dtc recordset on my asp page I get the above error.
The SQL is as follows.
Alter Procedure stpInsertMemberStatus
/*
This procedure is adding new member status's to tblMemberStatus
*/
(
@nUserID int,
@nAssociationID int,
@nTermID int,
@nPassed bit
)
AS
set nocount on
DECLARE @ReturnedUserID int,@ReturnedAssociationID int,@ReturnedTermID int,@ReturnedPassed bit
Select @ReturnedUserID=msUsID,@ReturnedAssociationID=msAsID,@ReturnedTermID=msTermID,@ReturnedPassed=msPassed from tblMemberStatus
where msUsID=@nUserID and
msAsID=@nAssociationID and
msTermID=@nTermID
If (@ReturnedUserID is Null or @ReturnedUserID='') and @nUserID<>'0'
Begin
INSERT INTO tblMemberStatus (msUsID,msAsID,msTermID,msPassed)
VALUES (@nUserID,@nAssociationID,@nTermID,@nPassed)
End
Else If @nPassed <> @ReturnedPassed
Begin
UPDATE tblMemberStatus SET msPassed=@nPassed WHERE
msUsID=@nUserID and
msAsID=@nAssociationID and
msTermID=@nTermID
End