You need to ensure that the application can detect all conflicts that occur between the offline customer information submitted to the SQL Server and the server version

You use Microsoft Visual Studio 2010 and Microsoft NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database. The application uses Data Contexts to
query the database. The application meets the following requirements:
• Stores customer data offline
• Allows users to update customer records while they are disconnected tram the server
• Enables online changes to be submitted back to the SQL Server by using the Data Context
object
You need to ensure that the application can detect all conflicts that occur between the offline
customer information submitted to the SQL Server and the server version. You also need to ensure
that you can roll back local changes. What should you do?

You use Microsoft Visual Studio 2010 and Microsoft NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database. The application uses Data Contexts to
query the database. The application meets the following requirements:
• Stores customer data offline
• Allows users to update customer records while they are disconnected tram the server
• Enables online changes to be submitted back to the SQL Server by using the Data Context
object
You need to ensure that the application can detect all conflicts that occur between the offline
customer information submitted to the SQL Server and the server version. You also need to ensure
that you can roll back local changes. What should you do?

A.
Add a try/catch statement around calls to the Submit Changes method of the Data
Context object and catch Sql Exceptions

B.
Add a try/catch statement around calls to the Submit Changes method of the Data Context object
and catch Change context Exceptions

C.
Override the Update operation of the Data Context object Call the Executedynamic
Update method to generate the update SQL

D.
Call the Submit Changes method of the Data Context object, Pass System Data L’nq
ConflictMode Continue OnConflict to the method

Explanation:
FailOnFirstConflict Specifies that attempts to update the database should stop immediately when
the first concurrency conflict error is detected.
ContinueOnConflict Specifies that all updates to the database should be tried, and that concurrency
conflicts should be accumulated and returned at the end of the process.
ExecuteDynamicUpdate() Method Called inside update override methods to redelegate to LINQ to
SQL the task of generating and executing dynamic SQL for update operations.
ConflictMode Enumeration
(http://msdn.microsoft.com/en-us/library/bb345922.aspx)
DataContext.ExecuteDynamicUpdate Method
(http://msdn.microsoft.com/enus/library/system.data.linq.datacontext.executedynamicupdate.aspx)



Leave a Reply 0

Your email address will not be published. Required fields are marked *