Skip to Content
0
Oct 05, 2013 at 07:30 PM

Insert into table fails Using XSJS

24 Views

Hello Experts,

I am using following code to to insert data in an table. But this gives error.

var conn = $.db.getConnection();  var pstmt = conn.prepareStatement('insert into \"SCHEMANAME.TABLENAME\" values(\'XXX\',\'20121006\',\'185712\', 12.0)');  var rs = pstmt.execute(); 

Same insert statement works fine from SQL console.

Question1: How can I fix this error?

Question2: How can I capture the exception ?

Please help.

Regards,

Atanu