PrepAway - Latest Free Exam Questions & Answers

Category: 70-526

Exam 70-526: TS: Microsoft .NET Framework 2.0 – Windows-Based Client Development.

Which code segment should you use?

A Windows Forms application contains the following code segment.

string SQL = @"SELECT EmployeeID, LastName, FirstName, FROM Emloyees";
SqlDataAdapter da = new SqlDataAdapter(SQL, connStr); DataTable dt = new DataTable();
da.MissingSchemaAction = MissingSchemaAction.AddWithKey; SqlCommandBuilder bld = new SqlCommandBuilder(da);
da.Fill(dt);

The application allows the user to add rows to the data table. The application will propagate these additions to the database.
If the addition of any row fails, the other rows must still be added. The code must log how many new rows to be added.
You need to propagate the additions to the database and log a failed count. Which code segment should you use?

Which code segment chould you use?

You are creating a Windows Forms application. The application uses a SqlCommand object named cmd. The cmd object executes the following stored procedure.

CREATE PROCEDURE GetPhoneList
AS
BEGIN
SELECT CompnayName, Phone FROM Customers
SELECT CompanyName, Phone FROM Suppliers
END

You need to add all returned rows to the ListBox control named lstPhones. Which code segment chould you use?

Which code segment should you use?

You are creating a Windows Forms application that includes the database helper methods UpdateOrder and UpdateAccount.
Each method wraps code that connect to a Microsoft SQL Server 2005 database, executes a Transact-SQL statment, and then disconnects from the database. You must ensure that changes to the database that result from the UpdateAccount method are committed only if the UpdateOrder method succeeds.
You need to execute the UpdateAccount method and the UpdateOrder method. Which code segment should you use?

Which code segment should you use?

A Windows Forms application contains the following code segment.
string SQL =
@"SELECT OrderID, ProductID, UnitPrice, Quantity FROM [Order Details]";
SqlDataAdapter da = new SqlDataAdapter(SQL, connStr); Data Table dt = new Data Table();
da.Fill(dt);

You need to add a new column to the data table named ItemSubtotal. The ItemSubtotal column must contains the named of the UnitPrice column multipled by the value of the Quantity column. Which code segment should you use?

which is only thrown for one user.What should you do to stop the exception from being thrown?

You are working as an application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. Domain.com uses Visual Studio 2005 as an application platform. Domain.com consists of a Development department. You as the developer of Domain.com use a client computer named Certkiller -WS023 as developing collateral. You are using the Semaphore class to synchronize access to a resource pool. During an inspection you find out that an exception of type UnauthorizedAccessException is thrown when you call the OpenExisting method of the Semaphore class, which is only thrown for one user.
What should you do to stop the exception from being thrown?

Which of the following numbers should you pass to the Release method?

You are busy creating an instance of Semaphore by means of calling its constructor. While the Semaphore instance was created, you specify four resources from a resource pool and reserve the three resources. You want to call the Release method of the Semaphore instance to allocate four available resources from the resource pool. Which of the following numbers should you pass to the Release method?


Page 8 of 15« First...678910...Last »