Skip to Content
Jul 09, 2013 at 05:10 PM

Calling Procedure from XSJS


Hi All,

I have two questions.

1. How to write a where condition in the below case

function test(){

var body = '';

var val1 = $.request.parameters.get('oVal1');

try {

var query =

'select \"A\", \"B\"

+ 'FROM \"\" + where \"A\" =

var conn = $.db.getConnection();

var pstmt = conn.prepareStatement(query);

var rs = pstmt.executeQuery();

without the where condition my query works fine and it pulls/display all the records.

I am not sure how to write clause using my variable val1 in this case.

2. I have created a get_data.procedure. Now i want to use this .procedure in my .XSJS service. I want to use val1 as my importing parameter.

Any Alternatives/Suggestions.

Thanks for comments in advance.

Message was edited by: Shahid Mohammed Syed