Hi ,

I am getting below error when i try to data from redshift with the below 
mentioned code

Code:

var jdbc = new ( require('jdbc') );

var config = {

libpath: 'C:/Users/ABCD/Desktop/jar/RedshiftJDBC41-1.1.6.1006.jar',

//libs: [__dirname + 'path/to/other/jars.jar'],

drivername: 'com.amazon.redshift.jdbc41.Driver',

url: 
'jdbc:redshift://examplecluster.abc123xyz789.us-west-2.redshift.amazonaws.com:5439/dev',

user: 'xxxx',

password: 'xxxxx'

};

jdbc.initialize(config, function(err, res) {

if (err) {

console.log(err);

}

});

var genericQueryHandler = function(err, results) {

if (err) {

console.log(err);

} else if (results) {

console.log(results);

}

jdbc.close(function(err) {

if(err) {

  console.log(err);

} else {

  console.log("Connection closed successfully!");

}

});

};

jdbc.open(function(err, conn) {

if (conn) {

                // SELECT statements are called with executeQuery 

                jdbc.executeQuery("select * from information_schema.tables", 
genericQueryHandler);

}

});

Error:

C:\Users\ABCD> node redshift.js
C:\Users\ABCD\node_modules\jdbc\lib\jdbc.js:62

if(this._props.getPropertySync('user') === undefined){

               ^

TypeError: undefined is not a function

at JDBCConn.initialize (C:\Users\ABCD\node_modules\jdbc\lib\jdbc.js:62:20)




at Object.<anonymous> (C:\Users\ABCD\Desktop\AngularJS\redshift.js:15:6)

at Module._compile (module.js:460:26)

at Object.Module._extensions..js (module.js:478:10)

at Module.load (module.js:355:32)

at Function.Module._load (module.js:310:12)

at Function.Module.runMain (module.js:501:10)

at startup (node.js:129:16)

at node.js:814:3

Could you please let me know whether there is nay issue with the above 
mentioned node jdbc usage for redshift?

Thanks

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/5e290df2-8539-4611-b451-0d61151b0aea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to