node-oracle
node-oracle copied to clipboard
execute not call back.....
i have install oracle on win7 64bit
code below :
var DB = {},
connectData = {
hostname : 'ip',
port : 1521,
database : 'oracle',
user : 'oracle',
password : 'pw'
};
DB.query = function(sql, callback) {
oracle.connect(connectData, function(err, connection) {
console.log(connection.isConnected())
if (err) { console.log('Error connecting to db:' + err); return; }
connection.execute(sql, [], function(err, results) {
if (err) { console.log("Error executing query:", err); return; }
callback && callback(results);
connection.close(); // call only when query is finished executing
});
});
}
connection.isConnected() // true
the execute method can not call back .... and not any error console
I had this same problem when I first started, same setup: win 7, 64 bit, Oracle 11gR2. It turned out to be an environment variable issue, and I somehow pulled the answer out of issues #90, #72, and #154.
For Windows 7 64-bit, DO NOT include the "c:\instantclient_12_1\vc10" path in the PATH variable as Install.md instructs. That section of your path env var should look like:
Path=C:\Python27\;C:\instantclient_12_1;C:\oracle\product\11.2.0\dbhome_1\bin;
@iGeechee
Thank you for your answer.
i found i don't config the python27 environment variable and i config it this run well
thank you!
I think the best we can add the Notes in install.md, python is not installed by default configuration environment variable
Glad I could help! Good thing I left Python's path in there, I was actually going to remove it prior to posting.