VB中调用存储过程,参数赋值求助??
user 2011-05-17 08:47:44 存储过程中,参数是这样的:
DECLARE @n_jc1 tinyint
DECLARE @n_jc2 tinyint
DECLARE @kmlxs nvarchar(500)
SELECT @n_jc1 = 1
SELECT @n_jc2 = 3
SELECT @kmlxs = N'case when cclass =N''资产'' then 1 else case when cclass =N''负债'' then 2 else case when cclass =N''权益'' then 3 else case when cclass =N''成本'' then 4 else 5 end end end end as lx'
EXEC @RC = [UFDATA_100_2011].[dbo].[GL_P_FSEYEB] @iPer1, @iPer2, @ibk, @c_code1, @c_code2, @n_jc1, @n_jc2, @isend, @kmlx, @exch, @yefw1, @yefw2, @kmlxs, @TRnd, @skmZdyType
在VB中,为参数赋值:
g_Cmd.Parameters(1) = 1
g_Cmd.Parameters(2) = 3
g_Cmd.Parameters(3)=? ‘第三个参数,我应该如何赋值?如果按照上面的写法会报错。