Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Problem In Recordset

Author  Topic 

samamun001
Starting Member

17 Posts

Posted - 2004-12-07 : 09:12:15
Hi there,
I have some problem in Stored Procedure. In my stored procedure I
am using two temporary table and make inner join with them. But whenever in the ASP page I am trying to get the recordset the following error has been shown

ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.



samamun

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-12-07 : 09:15:28
use
set nocount on
at the top of your sproc.

Go with the flow & have fun! Else fight the flow
Go to Top of Page

samamun001
Starting Member

17 Posts

Posted - 2004-12-07 : 23:56:01
I still have the same problem. I am giving the code below

CREATE PROCEDURE spGetNetCurrentAssetsForCurrentYear

AS

DECLARE @CurrentDate datetime
DECLARE @LastYearDate datetime

SET @CurrentDate = GETDATE()

CREATE TABLE #CurrentYearTable
(
AccountCode int,
AccountName nvarchar(255),
ParentAccountCode int,
ParentAccountName nvarchar(255),
CompanyID int,
TotalBalance float,
DisplayCriterion nvarchar(4000),
DisplayText nvarchar(4000)
)
INSERT #CurrentYearTable
EXECUTE Enosis_Equate.dbo.spCalculateAsset @CurrentDate, 1

/********************************************************************************/

CREATE TABLE #TempTable (TestDate datetime)

INSERT #TempTable
EXECUTE Enosis_Equate.dbo.spGetLastYearEndClosingDate @CurrentDate, 1, 1

SELECT @LastYearDate = TestDate FROM #TempTable

DROP TABLE #TempTable

/********************************************************************************/

CREATE TABLE #LastYearTable
(
AccountCode int,
AccountName nvarchar(255),
ParentAccountCode int,
ParentAccountName nvarchar(255),
CompanyID int,
TotalBalance float,
DisplayCriterion nvarchar(4000),
DisplayText nvarchar(4000)
)

INSERT #LastYearTable
EXECUTE Enosis_Equate.dbo.spCalculateAsset @LastYearDate, 1

SELECT #CurrentYearTable.*, #LastYearTable.TotalBalance AS LastYearBalance FROM #CurrentYearTable
INNER JOIN #LastYearTable ON #CurrentYearTable.AccountCode = #LastYearTable.AccountCode AND #CurrentYearTable.ParentAccountCode = -1 AND #LastYearTable.ParentAccountCode = -1

DROP TABLE #CurrentYearTable
DROP TABLE #LastYearTable

samamun
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-12-08 : 00:08:12
quote:
Originally posted by samamun001

Hi there,
I have some problem in Stored Procedure. In my stored procedure I
am using two temporary table and make inner join with them. But whenever in the ASP page I am trying to get the recordset the following error has been shown

ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.

samamun



are you sure the recordset is open?

--------------------
keeping it simple...
Go to Top of Page

samamun001
Starting Member

17 Posts

Posted - 2004-12-08 : 01:01:55
Ohh At last. I have made a mistake. Now It works fine

samamun
Go to Top of Page
   

- Advertisement -