Click here to Skip to main content
15,910,009 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

In button click i have to update values in 4 tables. so i write 4 queries in single stored procedure.when i execute the procedure first 2 queries are executed, but while in 3rd query db is fell down. so it(3rd & 4th) can't executed. At that time how to solve this problem?

1st Query - Executed
2nd Query - Executed
3rd Query - ?(problem arise)
4th Query - ?
Posted
Comments
[no name] 19-Apr-14 8:13am    
Catch the exception, log it and inform the user that there is a problem.
Karteek Panakani 19-Apr-14 8:26am    
Hi, did you get time out issue or any other issue?
Hemant Singh Rautela 19-Apr-14 8:41am    
First test your all query separately. Is it working fine...?
thatraja 21-Apr-14 5:32am    
what's the error? give us more details
Bh@gyesh 21-Apr-14 7:18am    
Please share your error.
Use transaction thing instead. So If any statement will fail, hole transaction will be rollback.

1 solution

use Try Catch to find the exception

http://technet.microsoft.com/en-us/library/ms175976.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900