views:

32

answers:

1

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.

A: 

I think your Query is not executing. When I tried same, I got an error.

select @CurrentSp=max(BLSprint) from ItemPlan
execute GetTeamPlanSp @ReleaseID, @CurrentSp
Shantanu Gupta
This is the original form I wrote. Same issue. BTW, how did you colorize the code?
phoenies
@phoenies: Stack provides this. When writing code see an icon above with some numbers written over there 101 010 . Or use " ` " symbol to highlight the code. Key just before "1" key
Shantanu Gupta