cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping-How to execute group of SQL Statements

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi XI Experts,

I want to Execute 5 sql statements in one java map.

Please help me how to acheive this , i written one java map i placed all SQL Statements ,i writen logic its working fine.

But its not a best advice to make a data base conection from JAVA Map.

Please help me on this.

Regards,

Raja Sekhar

Accepted Solutions (0)

Answers (6)

Answers (6)

rajasekhar_reddy14
Active Contributor
0 Kudos

thanks

Former Member
0 Kudos

Hi,

You can refer for basic overview...

http://en.wikipedia.org/wiki/Stored_procedure

This is my blog which has the same approach you want to take:

But if read comments you will understand this is not a good approach.

Also it has a sample stored procedure. You can check a few more blogs on stored proc.

Regards

Former Member
0 Kudos

Hi...

If u want to execute 5 sql statements, you can go for the stored procedure. And use this storedprocedure and do JDBC scenario.

Regards

Leela

Former Member
0 Kudos

Raja,

It depends on what volume of data you are going to exchange through Java mapping ..If it is not much i don't see any issue proceeding with Java Mapping else Prateek has mentioned a substitute for this.

Regards,

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi All ,

Thanks for your Quick Replay,

I habe to retrivee Order Document from 2 data base tables,

my client not accepting to perform direction conection from JAVA Map.Even its not a good design.

Then i decided to implement jdbc connection pooling mechanism to perfrom DB Look Ups.

But in my case i have 5 sql statements.

I am not that much aware about Stire procedure,

If there is anyblog regarding please help me.

Regards,

Raj

prateek
Active Contributor
0 Kudos

You know that it is not a good practice to perform database CRUD operations in mapping. If you are just selecting the data, then it is fine. You also have configured the scenario properly. So where is the problem?

If you want an aletrnative, then place JDBC as receiver and then send/ receive the data through it.

Regards,

Prateek

former_member181985
Active Contributor
0 Kudos

Use stored procedure concept i.e., call your stored procedure from JDBC receiver Adapter.

- Gujjeti.

Edited by: Praveen Gujjeti on Dec 17, 2008 8:11 AM