| ||
To | Do This |
---|---|
Create an UPDATE statement in SQL Server Management Studio | Right-click the desired table. Choose Script Table As. Choose Update To. Choose your destination. |
Update rows from a view | Make sure to update rows from only one table. |
Update rows in several tables using a view | Implement an INSTEAD OF trigger. |
Enhance control and security in update operations | Encapsulate the UPDATE commands into stored procedures. |
Perform other actions while updating data | Implement AFTER triggers on the table. |
Control errors during database actions | Use try catch blocks to obtain information from the ERROR_x functions. |
Update data from .NET | Use ADO.NET objects: Connection and Command |
Update data from .NET (2) | Use the Table Adapter as well as your own stored procedures in the Table Adapter. |
Control user information when errors occur | Catch the SqlClient.SqlException class and evaluate the Number value. |
| ||