Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execute not call back..... #242

Open
oneroundseven opened this issue Jan 13, 2015 · 4 comments
Open

execute not call back..... #242

oneroundseven opened this issue Jan 13, 2015 · 4 comments

Comments

@oneroundseven
Copy link

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

@SegFault0x0
Copy link

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;

@oneroundseven
Copy link
Author

@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!

@oneroundseven
Copy link
Author

I think the best we can add the Notes in install.md, python is not installed by default configuration environment variable

@SegFault0x0
Copy link

Glad I could help! Good thing I left Python's path in there, I was actually going to remove it prior to posting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants