咏南开发框架调用存储过程演示

create or replace package RD_pk
as
type Cursor_Ref is ref cursor;
end;

 

create or replace procedure P_999(p_cur out RD_pk.Cursor_Ref) is
begin
OPEN p_cur FOR
select c1,c2 from table999;
end P_999;

 

create or replace procedure P_998(p1 in varchar2, p2 in varchar2) is
begin
insert into table999(c1,c2) values (p1,p2);
COMMIT;
end P_998;

 

procedure TForm1.Button1Click(Sender: TObject);
var m:TServerMethods1Client;
begin
m:=TServerMethods1Client.Create(SQLConnection1.DBXConnection);
ClientDataSet1.Data := m.spOpen('1', 'P_999', null);
m.Free;
end;

procedure TForm1.Button2Click(Sender: TObject);
var m:TServerMethods1Client;
p:TParams;
begin
m:=TServerMethods1Client.Create(SQLConnection1.DBXConnection);
p:=TParams.Create(nil);
p.CreateParam(ftString, 'p1', ptInput).AsString := '1';
p.CreateParam(ftString, 'p2', ptInput).AsString := '1';
m.spExec('1', 'P_998', PackageParams(p));
m.Free;
p.Free;
end;

 

posted @   delphi中间件  阅读(405)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
历史上的今天:
2015-06-14 粘包的处理
点击右上角即可分享
微信分享提示