Chapter 12 Quick Reference

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.



Solid Quality Learning, Microsoft Corporation Staff - Microsoft SQL Server 2005 Database Essentials Step by Step
Solid Quality Learning, Microsoft Corporation Staff - Microsoft SQL Server 2005 Database Essentials Step by Step
ISBN: N/A
EAN: N/A
Year: 2006
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net