unidac连接oracle12c,Unidac如何调用Oracle12c包和存储过程

这段代码展示了如何在Delphi中使用TUniStoredProc组件来调用Oracle存储过程TEST.PKG_DEMO.mytest,设置输入参数ID和CNAME,并获取输出参数RESULT的值。最后通过ShowMessage显示输出参数的内容。
摘要由CSDN通过智能技术生成

直接上代码:

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;

原文:http://www.cnblogs.com/andy0898/p/4976204.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Universal Data Access Components (UniDAC) is a powerful library of nonvisual cross-database data access components for Delphi, Delphi for .NET, C++Builder, and Free Pascal. The UniDAC library is designed to help programmers develop faster and cleaner cross-database applications. UniDAC is a complete replacement for standard database connectivity solutions and presents an efficient native alternative to the Borland Database Engine and dbExpress for access to Oracle, SQL Server, MySQL, InterBase, Firebird, SQLite, DB2, Microsoft Access, Advantage Database Server, Adaptive Server Enterprise, and other databases (using ODBC provider). UniDAC is based on the well-known Data Access Components from Devart such as ODAC, SDAC, MyDAC, IBDAC, and PgDAC. We have joined the experience of long-term successful development into one great product which provides unified access to popular databases such as Oracle, Microsoft SQL Server, MySQL, InterBase, Firebird, SQLite, DB2, Microsoft Access, Advantage Database Server, Adaptive Server Enterprise, and other databases (using ODBC provider). The UniDAC library is actively developed and supported by Devart Team. If you have questions about UniDAC, email the developers at unidac@devart.com or visit UniDAC online at http://www.devart.com/unidac/. Advantages of UniDAC Technology UniDAC is very convenient in setup and usage. It provides transparent server-independent interface for working with different databases. Selected database provider ensures the best way to perform operations on the server. Universal Data Access UniDAC provides transparent server-independent interfaces for working with different databases, and lets you change the client engine for specific server type just by changing single connection option. It means that you can easily switch between database servers in your cross-database UniDAC-based application. Server-Aware Providers UniDAC chooses the best way specific to the server to perform most operations. Every UniDAC data provider uses server-specific native connectivity. All operations with data are performed by providers automatically considering peculiarities of the selected database server. Optimized Code The goal of UniDAC is to enable developers to write efficient and flexible database applications. The UniDAC library is implemented using advanced data access algorithms and optimization techniques. Classes and components undergo comprehensive performance tests and are designed to help you write high-performance, lightweight data access layers. Compatibility with Other Connectivity Methods The UniDAC interface retains compatibility with standard VCL data access components like BDE. Existing BDE-based applications can be easily migrated to UniDAC and enhanced to take advantage of server-specific features. Development and Support UniDAC is a cross-database connectivity solution that has been actively developed and supported. UniDAC comes with full documentation, demo projects, and fast (usually within one business day) technical support by the UniDAC development team. Find out more about how to get help or submit feedback and suggestions to the UniDAC development team in the Getting Support topic. A description of the UniDAC components is provided in the Component List.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值