procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
begin
with adostoredproc1 do
begin
close;
parameters.clear;
adostoredproc1.ProcedureName:='byroyalty'; // Parameters.clear;
Parameters.CreateParameter('@royaltyper',ftstring,pdinput,6,0);
parameters.ParamValues['@royaltyper']:=400;
adostoredproc1.Prepared;
adostoredproc1.ExecProc;
//stringgrid1.RowCount:=adostoredproc1.RecordCount+1;
//first;
for i:=1 to adostoredproc1.recordcount do
begin
stringgrid1.Cells[1,i]:=parameters.ParamValues['au_id'];
next;
end;
end;
end;
var
i:integer;
begin
with adostoredproc1 do
begin
close;
parameters.clear;
adostoredproc1.ProcedureName:='byroyalty'; // Parameters.clear;
Parameters.CreateParameter('@royaltyper',ftstring,pdinput,6,0);
parameters.ParamValues['@royaltyper']:=400;
adostoredproc1.Prepared;
adostoredproc1.ExecProc;
//stringgrid1.RowCount:=adostoredproc1.RecordCount+1;
//first;
for i:=1 to adostoredproc1.recordcount do
begin
stringgrid1.Cells[1,i]:=parameters.ParamValues['au_id'];
next;
end;
end;
end;
解决方案 »
- indy 10 ftp访问中文文件夹和文件的问题
- 大家遇到过这个问题没有?
- 安装EhLib 4.3 Build 4.3.21时遇到问题,请指点
- 问个新手问题!!
- 谁会用汇编语言模拟一个按按键盘
- 怎么查询数据库里面已有的记录啊?在线等待....
- 我想让Word界面显示在自己制作的窗体上,但又不想用OLE容器控件或者WebBrowser,请问如何实现?
- 我的DELPHI里显示不出来中文是怎么回事???
- paradox数据库的操作问题
- 怎样将ListView1组件中StateImage1关联的图标显示在Column上字符串的右边,而不是系统默认的左边!
- 单引号在Delphi中怎么表示?VC中好像是“\'”
- 进度条的使用???
Query.Close;
Query.SQL.Clear;
Query.SQL.Add(‘SQL 语句’);
Query.Open;
2 Parameters.CreateParameter('@royaltyper',ftstring,pdinput,6,0);
@royaltyper也不是output参数,你怎么得到传回值啊!
3 为什么是stringgrid1而不是dbgrid1?