I'm using SQL Server6.5 and VB5 in my application. I'm calling a stored procedure from another stored procedure and populating a temp table. Then i do a select on this temp table. I get the 'No open cursor or closed cursor' error. The code for the stored procedure is given below.


@Param_ASL varchar(10)


Create table #Temp3
(AuthSortKey varchar(20) NULL,
Section varchar(20) NULL,
Sub_Section varchar(20) NULL,
Rpt_Rein_Co_Num varchar(20) NULL,
Federal_Tax_ID varchar(20) NULL,
NAICCode int NULL,

Yellow_Book_Name varchar(20) NULL,
GroupCode varchar(6) NULL,
Location varchar(20) NULL,
Credit_Rating varchar(20) NULL,
ORR varchar(20) NULL,
YBP3Detail_01 float NULL,
YBP3Detail_02 float NULL,
YBP3Detail_03 float NULL,
YBP3Detail_04 float NULL,
YBP3Detail_05 float NULL,
YBP3Detail_06 float NULL,
YBP3Detail_07 float NULL,
YBP3Detail_08 float NULL,
YBP3Detail_09 float NULL,
YBP3Detail_10 float NULL,
YBP3Detail_11 float NULL,
YBP3Detail_12 float NULL,
YBP3Detail_13 float NULL,
YBP3Detail_14 float NULL)

Insert into #Temp3 (AuthSortKey,Section,Sub_Section,Rpt_Rein_Co_Num,
Federal_Tax_ID,NAICCode,Yellow_Book_Name,GroupCode ,Location,Credit_Rating,ORR,
YBP3Detail_01,YBP3Detail_02,YBP3Detail_03,YBP3Deta il_04,YBP3Detail_05,
YBP3Detail_06,YBP3Detail_07,YBP3Detail_08,YBP3Deta il_09,YBP3Detail_10,
YBP3Detail_11,YBP3Detail_12,YBP3Detail_13,YBP3Deta il_14 )

Exec USP_YBP3 @Param_ASL,33,' '

Select * from #Temp3.

The VB5 code is given below.

Set rsTemp = pub_cnUse.OpenResultset(USP_CrossCheckReport, rdOpenStatic)
where rsTemp is the rdoResultset and pub_cnUse is the rdo connection object.

Is there anything i need to take care of when I call another procedure to populate a temp table.