PrepAway - Latest Free Exam Questions & Answers

Category: 70-561

Exam 70-561: TS: Microsoft .NET Framework 3.5, ADO.NET Application Development

Which expression string should you use to set the Expression property of the OrderTotal column?

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

The application contains a DataSet class. The DataSet class contains two tables named Order and OrderDetail as shown in the following exhibit.

You add a DataColumn class named OrderTotal to the Order table.
You need to ensure that the OrderTotal column stores the sum of the values in the LineTotal column of the OrderDetail table.

exhibit Which expression string should you use to set the Expression property of the OrderTotal column?

You need to ensure that on synchronization, any new row added to the client application is also added to the S

You create a Microsoft Windows Mobilebased 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 database. The application synchronizes the data in a large table named Products. The Products table is defined in the following manner.

The table has the following characteristics:

The default values are not defined for any column.
All the columns are non-nullable.
The ID and Price columns are synchronized.

You need to ensure that on synchronization, any new row added to the client application is also added to the SQL Server 2005 database.

exhibit Which code segment should you use?

Which code segment should you insert at line 04 to ensure that the values in the AccountSuspendedColumn column

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The application connects to a Microsoft SQL Server 2005 database.

The application contains a DataTable named CustomerAccts. The structure of the DataTable is as shown in the following table.

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

01 DataColumn AccountSuspendedColumn = new DataColumn();
02 AccountSuspendedColumn.DataType = typeof(Boolean);
03 AccountSuspendedColumn.ColumnName = "AccountSuspended";
04
05 CustomerAccts.Columns.Add(AccountSuspendedColumn);

You need to ensure that the values in the AccountSuspendedColumn column are set to True when the following conditions are satisfied:

The value contained in the LatePaymentsCount column is greater than 10.
The value contained in the OverrideCode column is equal to "EXEMPT".

exhibit Which code segment should you insert at line 04?

Which code segment should you insert at line 05 to ensure that the Order and the OrderDetail tables are popula

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

The application contains a DataSet object named OrderDS that has the Order and OrderDetail tables as shown in the following exhibit.

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

01 private void GetOrders(SqlDataConnection cn) {
02 SqlCommand cmd = cn.CreateCommand();
03 cmd.CommandText = "Select * from [Order]; Select * from [OrderDetail];";
04 SqlDataAdapter da = new SqlDataAdapter(cmd);
05
06 }

You need to ensure that the Order and the OrderDetail tables are populated.

exhibit Which code segment should you insert at line 05?

Which code segment should you insert at line 03 to fill the Order table with the next set of 5 records for eac

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

The application contains a DataSet object named orderDS. The object contains a table named Order as shown in the following exhibit.

The application uses a SqlDataAdapter object named daOrder to populate the Order table.
You write the following code segment. (Line numbers are included for reference only.)

01 private void FillOrderTable(int pageIndex) {
02 int pageSize = 5;
03
04 }

You need to fill the Order table with the next set of 5 records for each increase in the pageIndex value.

exhibit Which code segment should you insert at line 03?

What should you do connect to the Sales database when the user account for the connection is SalesUser?

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

The application is used to retrieve records from a database named Sales. The database resides on a Microsoft SQL Server 2005 server named ProdServer.
The application connects to the database by using an instance of the SqlConnection class that has the following connection string.

"Data Source=ProdServer;UID=SalesUser;PWD=Pa$$w0rd;"

When the application calls the Open method of the SqlConnection object, the following exception is thrown:

"Cannot open user default database. Login failed. Login failed for user ‘SalesUser’".

The default database for SalesUser is Sales.

You need to ensure that you can connect to the Sales database when the user account for the connection is SalesUser.

What should you do?

What should you do to calculate the tax amount for each order invoice in the Invoice DataTable object?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The application connects to a Microsoft SQL Server 2005 database.

The application uses a strongly typed DataTable class named Invoice to process order invoices.
The application contains third-party components and the Invoice DataTable class that cannot be recompiled.
The application processes the order invoices by passing the Invoice DataTable object to these third-party components.

You need to calculate the tax amount for each order invoice in the Invoice DataTable object.

What should you do?

What should you do to successfully delete the data from the tblCustomers table?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The application connects to a Microsoft SQL Server 2005 database.

You write the following two DDL statements.

CREATE TABLE tblCustomers(
CustID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
CompanyName VARCHAR(50) NOT NULL,
ContactName VARCHAR(100) NOT NULL)
GO

CREATE TABLE tblCustomerOrders(
OrderID INT IDENTITY(1,1) NOT NULL,
CustID INT NOT NULL FOREIGN KEY REFERENCES tblCustomers(CustID),
OrderDate DateTime NOT NULL)

When a user attempts to delete the data from the tblCustomers table during execution, the application throws a SqlException exception.
The application was designed without any DataRelation objects.

You need to successfully delete the data from the tblCustomers table.

What should you do?

What should you do to ensure that the application executes the parameterized queries?

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

The application uses Microsoft OLE DB Provider as the data provider. You change the data provider to Microsoft SqlClient. The application throws errors while executing parameterized queries.

You need to ensure that the application executes the parameterized queries.

What should you do?


Page 1 of 812345...Last »