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.
| 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 Iam 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 shownADODB.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
|
useset nocount on at the top of your sproc.Go with the flow & have fun! Else fight the flow |
 |
|
|
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 ASDECLARE @CurrentDate datetimeDECLARE @LastYearDate datetimeSET @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 #CurrentYearTableEXECUTE Enosis_Equate.dbo.spCalculateAsset @CurrentDate, 1/********************************************************************************/CREATE TABLE #TempTable (TestDate datetime)INSERT #TempTableEXECUTE Enosis_Equate.dbo.spGetLastYearEndClosingDate @CurrentDate, 1, 1SELECT @LastYearDate = TestDate FROM #TempTableDROP 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 #LastYearTableEXECUTE Enosis_Equate.dbo.spCalculateAsset @LastYearDate, 1SELECT #CurrentYearTable.*, #LastYearTable.TotalBalance AS LastYearBalance FROM #CurrentYearTableINNER JOIN #LastYearTable ON #CurrentYearTable.AccountCode = #LastYearTable.AccountCode AND #CurrentYearTable.ParentAccountCode = -1 AND #LastYearTable.ParentAccountCode = -1DROP TABLE #CurrentYearTableDROP TABLE #LastYearTablesamamun |
 |
|
|
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 Iam 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 shownADODB.Recordset error '800a0e78' Operation is not allowed when the object is closed. samamun
are you sure the recordset is open?--------------------keeping it simple... |
 |
|
|
samamun001
Starting Member
17 Posts |
Posted - 2004-12-08 : 01:01:55
|
| Ohh At last. I have made a mistake. Now It works finesamamun |
 |
|
|
|
|
|
|
|