一
一叶风铃
Unregistered / Unconfirmed
GUEST, unregistred user!
定义proc
create proc login
@name varchar(20),
@pwd char(10),
@type char(1),
@intret int output
as
if not exists (select * from [user]
where type=@type and [name]=@name and pwd=@pwd )
set @intret=0
else
set @intret=1
执行proc
ClientDataSet1.Close;
ClientDataSet1.CommandText:='';
ClientDataSet1.CommandText:=('exec login 1,2,3,4 output');
ClientDataSet1.Params.ParamByName('p1').Value:=trim(combobox1.Text);
ClientDataSet1.Params.ParamByName('p2').Value:=trim(edit1.Text);
ClientDataSet1.Params.ParamByName('p3').Value:=trim(edit2.Text);
ClientDataSet.Params.ParamByName('p4').Value:=0;
ClientDataSet.Execute;
这样执行可以不各位大虾,,输入参数怎么取出来啊
谢谢各位了
create proc login
@name varchar(20),
@pwd char(10),
@type char(1),
@intret int output
as
if not exists (select * from [user]
where type=@type and [name]=@name and pwd=@pwd )
set @intret=0
else
set @intret=1
执行proc
ClientDataSet1.Close;
ClientDataSet1.CommandText:='';
ClientDataSet1.CommandText:=('exec login 1,2,3,4 output');
ClientDataSet1.Params.ParamByName('p1').Value:=trim(combobox1.Text);
ClientDataSet1.Params.ParamByName('p2').Value:=trim(edit1.Text);
ClientDataSet1.Params.ParamByName('p3').Value:=trim(edit2.Text);
ClientDataSet.Params.ParamByName('p4').Value:=0;
ClientDataSet.Execute;
这样执行可以不各位大虾,,输入参数怎么取出来啊
谢谢各位了