直接上代码:
var
aStore: TUniStoredProc;
begin
aStore := TUniStoredProc.create;
.....省略
with aStore do
begin
Close;
StoredProcName := 'TEST.PKG_DEMO.mytest';
//Prepare;
Params.CreateParam(ftString,'ID',ptInput);
Params.CreateParam(ftString,'CNAME',ptInput);
Params.CreateParam(ftString,'RESULT',ptOutput);
ParamByName('ID').AsString := '0001';
ParamByName('CNAME').AsString := '张三'
Execute;
end;
showmessage(aStore.ParamByName('PRESULT').AsString);
end;