sqlserver存储过程的问题1!
1。在SQLSERVER7.0中定义了一个简单的存储过程:input
create proc input
@mzbh char(10)
as
select xm from sf where sf.bh = @mzbh
在PB8中使用这个存储过程,我使用了一个循环,取出树窗的BH作为存储过程的参数,可是只能得到一个值,怎样才能循环使用这个存储过程??
string ls_mzbh,ls_xm
int n
for n = 1 to dw_1.getitemstring(n,"bh")
declare mz_input procedure for input
@mzbh = :ls_mzbh;
execute mz_input;
do while sqlca.sqlcode = 0
fetch mz_input into :ls_xm;
loop
next