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