@@fetch_status值老不定?
declare yb SCROLL CURSOR for
select id from equipment where equipment.id between @beginsid and @endsid order by equipment.sid
open yb
while @@fetch_status=0
begin
fetch next from yb into @@id
insert into equipmentysdtemp(equipmentsid,equipmentsidgo)
values(@beginsid,@@fetch_status)
continue
end
close yb
deallocate yb
用asp.net调用此存储过程,过几分钟第一次试就正常,以后连续试都擦入空白,经测试,是@@fetch_status值老不定,不知为什么?