cancel
Showing results for 
Search instead for 
Did you mean: 

Error Handling while updating the DB table

former_member203631
Participant
0 Kudos

Hi Frnds,

I have a scenario where in I need to update/insert records into the Database Table, here I want to capture as much as information I can in case of any error during insertion/updating of the rows in to the table.

Ex: If we are trying to update/insert 10 records into the table then think 5th and 7th records failed then,

---> Is there any procedure by which we can collect all the records which were failed during update/insert?

-


> Can we achieve this by using stored procedures?

please provide your valuable answers.

Regards,

Shiv.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Shiv,

"stored procedures" will solve your problem!

Regards Mario

former_member203631
Participant
0 Kudos

Any helpfull links to achieve this?

Regards,

Shiv.

Former Member
0 Kudos

Hi,

Use these to wtire Stored Procedures

JDBC Stored Procedures

/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures

Calling stored procs in MaxDb using SAP Xi

/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi

Regards

Seshagiri

Former Member
0 Kudos

>>Can we achieve this by using stored procedures?

Yes,this needs to be done via stored procedures,normally when you are trying to insert/update some records and if there is any error then all the changes are rolled back and the database is returned to its old consistent stage.

Write a stored procedure which will keep on looking at the consistency of DB and will throw an error in case something goes wrong.

Thanx

Aamir