cancel
Showing results for 
Search instead for 
Did you mean: 

FILE to JDBC

naveen_chichili
Active Contributor
0 Kudos
205

Hi All,

I have a file to JDBC scenario where i have used JDBC lookup to get the last count from database and i am incrementing the count when ever i run the interface.

for particular Field ex:XYZ i have made as a * primary key* in my table DB table(to avoid duplication).

when i run single file i am able to fetch the count from DB and pass the incremented to respective table in DB

Now the problem is:

if there are two files in source folder two files got picked up and trying to access DB count (LOOKUP) simultaneously

When i place multiple files in the source location multiple files are picking at a time and trying to fetch the count simultaneously from DB and failing in Receiver adapter i am unable to pass UNIQUE value to the field for which i have set as a PRIMARY KEY in such cases.

Would appreciate if any one suggest the solution

Thanks in advance,

Naveen

View Entire Topic
Former Member
0 Kudos

Hi,

i feel it is bad design to perform JDBC look up to retrive value from Table to increase the count.

what you can do here is Enter time stamp value in Primary Key,time stamp always different , so you no need to perfrom once more time to get count value.

if i understood your req wrongly,ignore my suggestion.

Regards,

Raj

naveen_chichili
Active Contributor
0 Kudos

Hi Raj,

Thanks for your quick reply,

Actually my requirement was to set Invoice ID as a primary key... so i feel including time stamp will not be possible.

Please suggest.

Regards,

Naveen.