Which line of code should you insert at line 14?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft Synchronization Services for Microsoft ADO.NET.

The application uses a Microsoft SQL Server 2005 (Compact Edition) database. This database contains a table named Order. Microsoft Windows Mobilebased devices synchronize data concurrently with the database server.

You write the following code segment. (Line numbers are included for reference only.)

01 public class ServerSyncProvider : DbServerSyncProvider
02 {
03 public ServerSyncProvider()
04 {
05 SyncAdapter orderSyncAdapter =
06 new SyncAdapter("Order");
07 SqlCommand ManageRows = new SqlCommand();
08 ManageRows.CommandText =
09 "DELETE FROM dbo.Order WHERE OrderId = @OrderId " +
10 "AND ((UpdateTS <= @sync_last_received_anchor OR " +
11 "UpdateId = @sync_client_id ) OR @sync_force_write=1) " +
12 "IF (@@rowcount > 0) UPDATE Sales. Order_Tombstone SET "+
13 "DeleteId = @sync_client_id WHERE OrderId = @OrderId";
14
15 }
16 }

You need to ensure that the application performs the following tasks:

It allows bidirectional incremental data changes to the Order table.
It generates the ClientUpdateServerDelete action as a conflict.

Which line of code should you insert at line 14?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft Synchronization Services for Microsoft ADO.NET.

The application uses a Microsoft SQL Server 2005 (Compact Edition) database. This database contains a table named Order. Microsoft Windows Mobilebased devices synchronize data concurrently with the database server.

You write the following code segment. (Line numbers are included for reference only.)

01 public class ServerSyncProvider : DbServerSyncProvider
02 {
03 public ServerSyncProvider()
04 {
05 SyncAdapter orderSyncAdapter =
06 new SyncAdapter("Order");
07 SqlCommand ManageRows = new SqlCommand();
08 ManageRows.CommandText =
09 "DELETE FROM dbo.Order WHERE OrderId = @OrderId " +
10 "AND ((UpdateTS <= @sync_last_received_anchor OR " +
11 "UpdateId = @sync_client_id ) OR @sync_force_write=1) " +
12 "IF (@@rowcount > 0) UPDATE Sales. Order_Tombstone SET "+
13 "DeleteId = @sync_client_id WHERE OrderId = @OrderId";
14
15 }
16 }

You need to ensure that the application performs the following tasks:

It allows bidirectional incremental data changes to the Order table.
It generates the ClientUpdateServerDelete action as a conflict.

Which line of code should you insert at line 14?

A.
orderSyncAdapter.DeleteCommand = ManageRows;

B.
orderSyncAdapter.UpdateCommand = ManageRows;

C.
orderSyncAdapter.SelectIncrementalDeletesCommand = ManageRows;

D.
orderSyncAdapter.SelectConflictDeletedRowsCommand = ManageRows;



Leave a Reply 0

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