I have a SP as follows. When I execute it with ADO, the first returned recordset is closed. I have to call the NextRecordset
method to get the recordset I want. Why is that? How can I avoid the trouble? Thank you.
create proc GetTeamCurrentPlan
@ReleaseID varchar(30)
as
set nocount on
declare @CurrentSp smallint
set @CurrentSp=
(select max(BLSprint)
from ItemPlan)
execute GetTeamPlanSp @ReleaseID, @CurrentSp
Edit: GetTeamPlanSp
contains the line set nocount on
too.
It seems to be an issue about the assignment of @CurrentSp
.