H
hahali
Unregistered / Unconfirmed
GUEST, unregistred user!
存储过程如下:
create procedure dbo.get_s_regid(
@dhhm char(25),
@s_jhj char(2) output,
@s_detail char(20) output
)
as
declare @s_betele char(25)
declare @s_edtele char(25)
declare @s_s_jhj char(2)
declare @s_s_detail char(20)
declare @ii int
declare @i int
select @ii=count(*) from fanwei
select @i=1
select @s_jhj='nn'
select @s_detail=''
declare cu cursor for
select s_betele,s_edtele,s_jhj,s_detail from fanwei
open cu
while @@sqlstatus = 0 and @i<=@ii
begin
fetch cu into
@s_betele,@s_edtele,@s_s_jhj,@s_s_detail
select @i=@i+1
if @dhhm>=@s_betele and @dhhm<=@s_edtele
begin
select @s_jhj=@s_s_jhj
select @s_detail=@s_s_detail
close cu
return
end
end
close cu
在调用的时候返回
showmessage('ADOStoredProc1.Parameters.ParamByName('@s_jhj').Value)时报错
“invalid variant type conversion”,请问该如何解决?
create procedure dbo.get_s_regid(
@dhhm char(25),
@s_jhj char(2) output,
@s_detail char(20) output
)
as
declare @s_betele char(25)
declare @s_edtele char(25)
declare @s_s_jhj char(2)
declare @s_s_detail char(20)
declare @ii int
declare @i int
select @ii=count(*) from fanwei
select @i=1
select @s_jhj='nn'
select @s_detail=''
declare cu cursor for
select s_betele,s_edtele,s_jhj,s_detail from fanwei
open cu
while @@sqlstatus = 0 and @i<=@ii
begin
fetch cu into
@s_betele,@s_edtele,@s_s_jhj,@s_s_detail
select @i=@i+1
if @dhhm>=@s_betele and @dhhm<=@s_edtele
begin
select @s_jhj=@s_s_jhj
select @s_detail=@s_s_detail
close cu
return
end
end
close cu
在调用的时候返回
showmessage('ADOStoredProc1.Parameters.ParamByName('@s_jhj').Value)时报错
“invalid variant type conversion”,请问该如何解决?