1
我想打电话给使用节点Oracle驱动程序Oracle存储过程 - https://github.com/joeferner/node-oracle如何在节点js中处理oracle.sql.ARRAY?
我能够调用使用下面的代码的程序,但我有第二个参数(parameterArray)的问题。它需要传递一系列的项目,在java中我们使用oracle.sql.ARRAY,但是如何处理这个节点js?我当前的代码如下...
var oracle = require('oracle');
var connectData = {
hostname: "example_editted.com",
port: 1521,
database: "dev", // System ID (SID)
user: "user",
password: "password"
}
oracle.connect(connectData, function(err, connection) {
var starting_time = req.body.startDate + " 00:00:00"
var ending_time = req.body.endDate +" 00:00:00"
var parameterArray = {owner_id: req.body.accountId, time_min: null, time_max: null, duration_min: null, duration_max: null, date_format: "'MM/DD/YYYY HH24:MI:SS'", start_date: starting_time, end_date: ending_time}
connection.execute("call reporting.execute_report(:1, :2, :3)", ["ProcedureName", parameterArray,new oracle.OutParam()], function(err, results) {
的当前错误,我得到的是
Assertion failed: (handle->InternalFieldCount() > 0), function Unwrap, file /Users/johnson/.node-gyp/0.10.35/src/node_object_wrap.h, line 61.
Abort trap: 6
通过我所看到的** ** **(没有任何node.js经验),您正试图传递字符串索引关联数组,Oracle调用接口不允许。无论你在哪里谷歌的“绑定关联数组索引varchar2”,你只会发现失败提到这样做。通过OCI传递数组/集合只允许用于整数索引的afaik。 – nop77svk 2015-01-12 07:56:27