cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Structure

Former Member
0 Kudos

Hi Experts,

How to work on two tables in a singe structure.

I understand that we can create 5 substructures in a single structure.

for first can we use Table =x,action = select

For second Table = y,action =update

Can we do this?if not how to use two tables simultanioustly

Thanks,

Srinivasa

Accepted Solutions (1)

Accepted Solutions (1)

former_member181985
Active Contributor
0 Kudos

You can have a single structure like this. The statements nodes for update & select can be 0...unbounded in nature. It all depend on your requirement.

e.g.,

<MT>
	<StatementName_UPDATE>  
	<dbTableName action="UPDATE">
	<table>UPDATETABLE</table>
	<access>
	<col1>val1</col1>
	<col2>val2new</col2>
	</access>
	<key1>
	<col2>val2old</col2>
	<col4>val4</col4>
	</key1>
	</dbTableName>
	</StatementName_UPDATE>


	<StatementName_SELECT>
	<dbTableName action="SELECT">
	<table>SELECTTABLE</table>
	<access>
	<col1/>
	<col2/>
	<col3/> 
	</access>
	<key1>
	<col2>val2old</col2>
	<col4>val4</col4>
	</key1>
	<key2>
	<col2>val2old2</col2>
	</key2>
	</dbTableName> 
	</StatementName_SELECT>
</MT>

Multimapping is not required.

Edited by: Praveen Gujjeti on Mar 10, 2010 11:00 PM

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos
Can we do this?if not how to use two tables simultanioustly

Yes you can do this and that too in one Message Type itself....the structure will be similar to what Praveen has given.....will have only one JDBC channel in this case

One Message Type is possible only when the n tables that you are referring reside in the same Database..... if the tables are in different Database you have to use Multimapping (will have different receiver JDBC channels in this case)

Regards,

Abhishek.

Former Member
0 Kudos

Thanks all,

Can I use two Select statements from 2 different tables .

Eg:

MT A

Statement

Test

Action->Select

Table->abc

access

n1

n2

n3

MT A

Statement

Test

Action->Select

Table->XYZ

access

n1

n2

n3

Thanks,

Srinivasa

Former Member
0 Kudos

Hi Srinivaas,

You use two different message types one for select and one for update and do a multimapping should work for you.

Regards,

---Satish