三层结构中如何调用存储过程? 在三层结构中如何使用adostoreproce调用SQLSERVER2000中带参数的存储过程? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在应用服务器中放入adostroedproc连接上相应的存储过程在客户端使用clientdateset与之连接,获得他的参数,然后对应他的参数设置即可 例子!DM_Client.StoredProc.Close; DM_Client.StoredProc.ProcedureName:='XY_INSERT'; DM_Client.StoredProc.Parameters.Clear; DM_Client.StoredProc.Parameters.Refresh; DM_Client.StoredProc.Parameters.ParamValues['IX_ID']:=Trim(edt_gbxyid.Text); DM_Client.StoredProc.Prepared:=True; DM_Client.StoredProc.ExecProc;还有注意,有可能存储过程当中的输出参数,也要提前付值 好象要在clientdataset的commandtext属性中设置参数执行存储过程,该怎么设置,SQLSERVER上的存储过程有多个参数? 跟一般sql语句一样,Ado.CommandText:='exec Your_SP_Name :param1,:Param2'Ado.ParamByName['Param1']:='haha';Ado.ParamByName['Param1']:='hehe'; 对,和一般的SQL语句一样就可以了 DELPHI 模拟鼠标点击问题,使用绝对坐标 用ODAC控件连接数据库时出错:Cannot allocate OCI handle. DELPHI设计软件做统计一般用什么控件好? delphi6的ado怎么只能支持4位小数点? 数据库密码的问题 如何截取图片中的某一部分 有关CoInitializeEx 我的神呀,这是什么问题 各位大哥!请给小弟一条明路~!~~小弟是初学者 关于XE10 Android手机APP 上传图片FTP 到服务器目录下的问题 時間比較問題 请问关于效果的问题
在客户端使用clientdateset与之连接,获得他的参数,然后对应他的参数设置即可
DM_Client.StoredProc.Close;
DM_Client.StoredProc.ProcedureName:='XY_INSERT';
DM_Client.StoredProc.Parameters.Clear;
DM_Client.StoredProc.Parameters.Refresh;
DM_Client.StoredProc.Parameters.ParamValues['IX_ID']:=Trim(edt_gbxyid.Text);
DM_Client.StoredProc.Prepared:=True;
DM_Client.StoredProc.ExecProc;
还有注意,有可能存储过程当中的输出参数,也要提前付值
Ado.CommandText:='exec Your_SP_Name :param1,:Param2'
Ado.ParamByName['Param1']:='haha';
Ado.ParamByName['Param1']:='hehe';