How to make sure that the operation on database is successful?
Suppose there is Insert or Update or Delete operation is performed on a database table. How you make sure that the operation(Insert, Update or Delete) is successful?
Re: How to make sure that the operation on database is successful?
using
code:
SELECT * FROM (name of table)
to see did its realy add things that you are alraday adds
Re: How to make sure that the operation on database is successful?
If the transaction is not successful, you will get error message displayed like what you see in some web pages. In programming languages, like VB, if you execute sql statements through those language's built-in controls ie. ADODB, there are options to catch failed queries using properties/methods of those controls. Anyway a transaction will never be updated partially in SQL server, It will either updated fully or not at all.