在存储过程里return -1,在DELPHI里如何取得这个值??????
解决方案 »
- RichEdit不能粘贴中文
- 一个 Delphi 的群:13830859
- 请教,如何解决MDI+DLL+FastReport3.13的综合应用系统,关闭时出错的问题?
- 想写一个网络电影的抢线程序,求给个思路!
- Delphi 7当中的Internet中的ClientSocket,ServerSocket怎么都没了?是不是被Indy系列给替代了?
- bde administrator 如何卸载?
- 一个关于远程资源管理的问题
- 请问 如何用DELPHI实现发电子邮件
- 高手帮忙!谁有图书馆管理系统啊?sql数据库,delphi开发
- 紧急求助:关于midas
- unit,class,调用
- 高分在线求教,用什么API可以调用windows的域服务器验证用户名密码
dm1.ClientDataSet1.CommandText:='';
if ComboBox2.Text='买入' then
dm1.ClientDataSet1.CommandText:='Execute Sp_buy :_Account,:_Stock_Code,:_Price,:_Amount,:@state output'
else
if ComboBox2.Text='卖出' then dm1.ClientDataSet1.CommandText:='Execute Sp_sale :_Account,:_Stock_Code,:_Price,:_Amount,:@state output'; dm1.ClientDataSet1.Params.ParamByName('_Account').value:=Main_Form.account;
dm1.ClientDataSet1.Params.ParamByName('_Stock_Code').value:=Stock_InterCode[ComboBox1.ItemIndex];
dm1.ClientDataSet1.Params.ParamByName('_Price').value:=edit2.Text;
dm1.ClientDataSet1.Params.ParamByName('_Amount').value:=edit1.Text;
dm1.ClientDataSet1.Params.ParamByName('@state').ParamType:=ptoutput;
dm1.ClientDataSet1.Params.ParamByName('@state').DataType:=ftinteger; DM1.ClientDataSet1.Execute; if dm1.ClientDataSet1.Params.ParamByName('@state').Value=1 then
showmessage('可支配资金不足,买单提交失败!')
else if dm1.ClientDataSet1.Params.ParamByName('@state').Value=2 then
showmessage('股票可支配量不足,卖单提交失败!')
else
showmessage('提交成功!');
end;
@state int output
并对其赋值即可