node-oracle
node-oracle copied to clipboard
Error while executing Store procedure
Hi Guys,
I am able open the connection and able to execute the sql fine but when I am trying to execute the procedure, its just returning very generic message. any help will be appreciate..
Error: ORA-00900: invalid SQL statement
below is my code. sql = "EXECUTE xxxxx ( '2022', :1 );"; // callback(null, 'Success'); oracle.connect(connString, function (err, connection) { if (err) { logger.error('connection Error ' + err); callback(err, null); } else { logger.debug('connection success'); connection.execute(sql, [new oracle.OutParam(oracle.OCCICURSOR)], function (err, results) { if (err) { logger.error('Error in execution of SP' + err); connection.close(); } else { connection.close(); logger.debug('Results ' + JSON.stringify(results)); callback(null, results); }
});
}
});
EXECUTE is a SQL*Plus client command. It's not part of SQL or PL/SQL. Try using a BEGIN END block.