cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC : Rollback

Former Member
0 Kudos

HI

I am using JDBC as Receiver and my req is getting file(FTP) and (delete * from tables ) then (insert * into tables) using JDBC) /multiple tables.

Its like this.Part of data from file into one table and 2nd part into other table,but remember before inserting data from file to DB i have to delete all from DB.

My question is ...In this process,after deletion and before inserting if some thing happens do we have an option to rollback everything in DB.

Please let me know

Thanks

Prabhakar

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Thanks Alex.

Former Member
0 Kudos

HI Prabhakar

Using BPM you can hold back data if any error happend, you can raise the alert as well.

Another thing that you can do is Make the scenario File - Java proxy and from proxy you insert the data. There you can use Heirarcial SQL statement and even check at every state if the data is inserted/updated/deleted or not and can rollback

Thanks

Gaurav

Former Member
0 Kudos

Any more Ideas?

Former Member
0 Kudos

Hey just to give you some confirmation on the above proposal of using a stored procedure.

I have worked with a similar requirement in the past and after looking at a few options, I ended up going for the stored procedure.

It was better as the logic is encapsulated on the DB side, this way it guarentees the data is treated correctly.

Former Member
0 Kudos

you can achieve it by using database stored procedure.

you just write stored procedure and write delete and insert statement in that , there you can also handle the rollback .

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

I think there is nothing specific for rollback, but i think using BPM you can use Exceptions to avoid a mistake.