Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var oracledb = require('oracledb');
- //replace connectString as appropriate
- var connectionInfo = {
- user: 'nodetest',
- password: 'nodetest',
- connectString: ""
- }
- //arbitrarily large to help trigger this
- var runs = 400;
- let runIt = (theNumber) => oracledb.getConnection(connectionInfo,
- function(error, connection) {
- if (error) return;
- else {
- var sql = 'BEGIN testNumericOutBinds(:numberIn, :numberOut); END;'
- var params = {
- numberIn: theNumber,
- numberOut: {
- type: oracledb.NUMBER,
- dir: oracledb.BIND_OUT
- }
- }
- connection.execute(sql, params, function(err, result) {
- if (err) {
- console.log('tried number ' + theNumber, err)
- }
- console.log(result);
- connection.close(function(err, a){})
- });
- }
- });
- for(var theNumber = 0; theNumber < runs; theNumber++) {
- runIt(theNumber);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement