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

The console log statement not working when select query is executed #247

Open
thaihoc opened this issue Jan 22, 2015 · 0 comments
Open

The console log statement not working when select query is executed #247

thaihoc opened this issue Jan 22, 2015 · 0 comments

Comments

@thaihoc
Copy link

thaihoc commented Jan 22, 2015

I have installed the node-oracle module and have connected to an oracle database successfully. But, I have a problem when I execute a select query. My code is below (the file name is tests-connection.js):

    
    connection.execute("SELECT * FROM DM_LINH_VUC", [], function(err, results){
        if (err) { console.log("Error executing query:", err); return; }
                
                        
        console.log(results); //This statement's not working
        connection.close(); 
    });
    

The output in Node.js command prompt (nothing):

    C:\xampp\htdocs\motcua.dev\public\socket.io\node_modules\oracle>node tests-connection
    C:\xampp\htdocs\motcua.dev\public\socket.io\node_modules\oracle>

I have tried to update a record and it works, but when I execute a select query I do not see any output in the console log statement. The terminal is empty until the code that is executing is finished.

How can one fix this problem?

Thanks

@thaihoc thaihoc changed the title Can not execute the console log statement when execute select query The console log statement not working when execute select query Jan 23, 2015
@thaihoc thaihoc changed the title The console log statement not working when execute select query The console log statement not working when select query is executed Jan 23, 2015
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

1 participant