1.
You are creating a Windows Forms application. The application displays data from a Microsoft SQL Server 2005 database in a DataGridView control. The DataGridView control is populated by a data table. The data
table is filled by using a SqlDataAdapter object. You need to display changes to the database as they happen without polling the database. What should you do?
2.
A method in your Windows Forms application executes a stored procedure in a Microsoft SQL Server 2005 database, and then executes a second stored procedure in a second SQL Server 2005 database. You need to
ensure that the call to the first stored procedure writes changes only if the call to the second stored procedure succeeds. Destination requirements prohibit you from introducing new components that use the COM+ hosting
model. What should you do?
3.
A Windows Forms application programmatically creates the schema for a dataset. The dataset includes a data table named Departments. The Departments table includes columns named DepartmentID and
DepartmentName. You need to ensure that the Departments table assigns a unique integer value to the DepartmentID column when a new row is added. What should you do?
4.
You are creating a Windows Forms application to retrieve and modify data. Depending on the installation, the data source can .. a Microsoft Access database or a Microsoft SQL Server 2000 or later database. You need to ensure that your application accesses data by automatically using the data provider that is optimized for the data source. What should you do?
5.
You are creating a Windows Forms application. The application executes a stored procedure that takes several seconds to complete. The procedure is invoked to populate a SqlDataReader object. You need to ensure that the application remains responsive to the user while the stored procedure is executing. What should you do?
6.
You are creating a Windows Forms application that implements a master/detail form by using two DataGridView controls. You populate a dataset with a master table and a details table. You set the DataSource property of the master DataGridView control to the dataset. You set the DataMember property to the name of the master table. You also set the DataSource property of the details DataGridView control to the dataset. You need to ensure that the details DataGridView control displays only the child rows of the selected master row.
What should you do?

 
7.
You are creating a Windows Forms application. Initialization code loads a DataSet object named ds that includes a table named Users. The Users table includes a column named IsManager. You need to bind the
IsManager column to the Checked property of a check box named chkIsManager. Which code segment should you use?
8.
You are creating a Windows Forms application. The application loads a data table named dt from a database and modifies each value in the data table. You add the following code.
(Line numbers are included for reference only.)
01 foreach (DataRow row in dt.Rows) {
02 foreach (DataColumn col in dt.Columns) {
04 Trace.WriterLine(str);
05 }
06 }
You need to format the string named str to show the value of the column at the time the data is loaded and the current value in the column. Which code segment should you add at line 03?
9.
You have called a stored procedure that returns a row set that has data about electrical chips. You then load the part data in a DataSet instance named testdataSet.
The DataSet has a single Data Table instance. The DataTable instance's TableName property is set to Part.
Which code segment should you use to display the part data in a DataGridView control named testdataGridView?
10.
You create an application that provides accessibility features. Your standard forms display a background image. When the user selects Use High Contrast in the Accessibility Options in Control Panel, you want this
image to be removed. You need to add an event to handle this accessibility setting change.
Which event should you use?