如何从 PL/SQL、Oracle Forms 调用 Perl 模块? [英] How do I call Perl modules from PL/SQL, Oracle Forms?

查看:92
本文介绍了如何从 PL/SQL、Oracle Forms 调用 Perl 模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想要做的是将数据从 Oracle Forms 导出到 XLS 文件(服务器端).我们发现 Perl 有出色的 SpreadSheet::WriteExcel 和 SpreadSheet::WriteExcelXML 模块.这样做的好处是我们不必安装任何其他应用程序(如 MS Excel、OpenOffice).

What we would like to do is to export data from Oracle Forms into XLS file (server-side). We found out that Perl has superb SpreadSheet::WriteExcel and SpreadSheet::WriteExcelXML modules for this. The best thing with this is we don't have to have any other apps (like MS Excel, OpenOffice) installed.

一种方法是连接到我的数据库,执行查询并生成 XLS 文件 - 一切都来自 Perl 脚本.但是,因为在一个地方维护所有代码会更容易,所以有没有办法从 Oracle Forms 的 PL/SQL 代码中调用这些 Perl 模块??

One way is to connect to my database, execute query and generate XLS file - everything from a Perl script. But, because it would be easier to maintain all the code in one place, is there a way to call these Perl modules from a PL/SQL code from the Oracle Forms??

谢谢

推荐答案

从 90 年代的 4.5 开始,我就不知道 oracle 表单了,我认为从那时起它就发生了一些变化.

I don't know oracle forms since 4.5 back in the 90s, I assume its moved on a bit since then.

如果您的 PL/SQL 正在运行服务器端,那么您可以查看 extproc_perlhttp://www.smashing.org/extproc_perl/userguide.html但我认为这可能有点麻烦——我只写过 C++ exptprocs,从来没有写过 perl.期待一些动态链接出牙问题.此外,代码不直接在 PL/SQL 中.您必须围绕 perl 编写一个 PL/SQL 包装器(实际上是围绕调用 perl 的 C - 但您不必担心 C).

If you PL/SQL is running server side, then you could look at extproc_perl http://www.smashing.org/extproc_perl/userguide.html But I reckon that could be a bit of hassle - I have only written C++ exptprocs, never perl. Expect some dynaimic linking teething problems. Also the code is not directly in the PL/SQL. You have to write a PL/SQL wrapper around the perl (actually around the C which invokes the perl - but you shouldn't have to worry about the C).

更简单的解决方案(我认为您已经提到过)是让表单调用 perl CGI 脚本,该脚本与数据库建立自己的连接,然后输出 excel 作为结果.

The simpler solution (which I think you have already alluded to) is to have the form invoke a perl CGI script which makes its own connection to the DB, and then outputs the excel as the result.

这篇关于如何从 PL/SQL、Oracle Forms 调用 Perl 模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆