Skip to Content
avatar image
Former Member

JDBC Structure

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 10, 2010 at 05:30 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 10, 2010 at 05:17 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 11, 2010 at 05:40 AM
    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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