var mysql = require('mysql'); var db_local_config = { host : 'your_host_ip', user : 'userName', password : 'password', database : 'database' }; var conLocalPool = mysql.createPool(db_local_config); str = "call my_stored_procedure(parameters)"; conLocalPool.getConnection(function (err, con) { if (err) console.log('Error while performing Query.' + err); con.query(str, function (err, rows, fields) { if (err) console.log('Error while performing Query.' + err); else { console.log(rows[0]); } //con.destroy(); //con.end(); //con.release(); }); //mysqlPool.destroy(); //con.end(); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)