cancel
Showing results for 
Search instead for 
Did you mean: 

How to set Query SQL Statement parameter dynamically in Sender JDBCAdpter

Former Member
0 Kudos

Hi All,

I have one scenario in which we are using JDBC Sender Adapter.

Now in this case,we need to set Query SQL Statement with a SELECT statement based on some fields.

This SQL statement is not constant, it would need to be changed.

Means sometimes receiver will want to execute SQL statement with these fields and sometimes they will want to execute it with different fields.

We can create separate channels for each SQL statement but again that is not an optimum solution.

So ,I am looking out for a way to set these parameters dynamically or set SQL statement at Runtime.

Can you all please help me to get this?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey

on what basis you will change the select query on sender side?

i mean suppose u have the query like select * from emp where empID=000

now how will XI know what and when to change the query?

as suggested by Raj you can design a File to JDBC scenario using BPM,send the query from the file and pull up the data based upon this query now once u have got those values then do proper message mapping with the end receiver structure and eventually send the message to end receiver.

suppose the scenario right now is JDBC to IDOC

then your scenario will become like

File ->JDBC Request->JDBC response->IDOC.

Thanx

Aamir

justin_santhanam
Active Contributor
0 Kudos

Shweta ,

<i>Sometimes receiver will want to execute SQL statement dynamically</i>....

How you will get the query dynamically? Ok Let me assume, consider they are sending the query through file, then its definitely possible. But u need BPM and also not sender JDBC receiver adapter instead, receiver JDBC adapter.

SQL Query File ->BPM>Synchronous send [Fetch data from DB]--->Response -


>...............

Do u think the above design will suit's ur case!!!!

Best regards,

raj.