0

I have a problem with getting data from oracle11g db from my nodejs, after I made a connection to my database, i'm trying to query it to get a values from 1 table but got this error ORA-00942, tryed several ways to select but still the same result

that's how I connect

var oracledb = require('oracledb');  
oracledb.getConnection({  
   user: "MyUser",  
   password: "MyUserPass",  
   connectString: "localhost/Study"  
}, function(err, connection) {  
   if (err) {  
        console.error(err.message);  
        return;  
   }  
   connection.execute( "SELECT * FROM qt_date",  
   [],  
   function(err, result) {  
        if (err) {  
             console.error(err.message);  
             doRelease(connection);  
             return;  
        }  
        console.log(result.metaData);  
        console.log(result.rows);  
        doRelease(connection);  
   });  
});  

function doRelease(connection) {  
   connection.release(  
        function(err) {  
             if (err) {console.error(err.message);}  
        }  
   );  
}  

and that's what i'm expecting to see

enter image description here

but all i got is error - ORA-00942: table or view does not exist

I tried several ways to select, similar to this one - select * from myUser.qt_date, but still got the same result

and also i thinks this problem is related to another one -

why do I have this undefined table in sql developere when i'm doing select but nothing like this when I'm inserting values ?enter image description here

thanks

Vladimir Zaguzin
  • 191
  • 5
  • 22
  • `"qt_date"` and just `qt_date` is not the same table name. The one with quotes is case-sensitive. – Mat Oct 08 '17 at 19:33
  • if I remove " " from sql developer's query, I would get the same error as in node, that's why i thinks it's related but i don't know how to fix it – Vladimir Zaguzin Oct 08 '17 at 19:38

1 Answers1

0

I think I found a solution, I made a mistake and create my tables with "" around the name

Vladimir Zaguzin
  • 191
  • 5
  • 22