Chapter 14

C# Programming: From Problem Analysis to Program Design · 19 exercises

Problem 1

An in-memory representation of multiple rows and columns of data from the database is stored in what type of object? a. data provider b. data reader c. datagrid d. dataset e. data adapter

3 step solution

Problem 2

An in-memory representation of multiple rows and columns of data from the database is stored in what type of object? a. data provider b. data reader c. datagrid d. dataset e. data adapter

3 step solution

Problem 3

Which of the following is the class name of a gridlike structure used to display data from a database? a. ComboBox b. ListBox c. DataGridView d. Grid e. GridData

3 step solution

Problem 4

Databases store information in records, fields, and: a. data providers b. grids c. columns d. tables e. commands

4 step solution

Problem 5

The core classes available with each data provider include all of the following except: a. Connection b. DataAdapter c. Command d. DataSet e. DataReader

4 step solution

Problem 6

The core classes available with each data provider include all of the following except: a. Connection b. DataAdapter c. Command d. DataSet e. DataReader

4 step solution

Problem 7

Which of the following is a valid SQL statement that retrieves all four columns from the customer table? a. SELECT ALL FROM customer b. SELECT * FROM customer c. SELECT customer d. SELECT,,,, FROM customer e. SELECT @@@@ FROM customer

4 step solution

Problem 8

Parameters for SQL Server SQL statements are written slightly different from those written for an Access database. With SQL Server, a parameter is indicated using: a. @ followed by an identifier b. @ without an identifier c. ? followed by an identifier d. @ without an identifier e. a params keyword

4 step solution

Problem 9

The SQL clause that can be added to a SELECT statement to retrieve data from multiple tables is: a. BETWEEN b. INNER JOIN c. CROSS CONNECTION d. WHERE e. UPDATE

3 step solution

Problem 10

The following namespaces (System.Data.OleDB, System.Data.SqlClient, System.Data.Odbc, System.Data.OracleClient) include classes for different: a. data providers b. file streams c. ADO.NET applications d. databases e. data readers

5 step solution

Problem 11

For read-only access to databases, which ADO.NET class is used? a. DataSet b. DataAdapter c. CommandBuilder d. Connection e. DataReader

6 step solution

Problem 12

To provide access to an Access database management system, which data provider is used? a. System.Data.OleDb b. System.Data.SqlClient c. System.Data.Odbc d. System.Data.OracleClient e. Microsoft ACE.OLEDB.12.0

3 step solution

Problem 13

Which class is used with the dataset class to facilitate using a disconnected database? a. DataAdapter b. DataReader c. Command d. OleDbConnection e. Fill

4 step solution

Problem 14

To avoid writing additional SQL statements to update a live database, you instantiate an object of which class? a. DataAdapter b. DataReader c. Connection d. CommandBuilder e. DataGrid

4 step solution

Problem 17

Which method is used to originally populate a data-bound control? a. Dataset Fill( ) method b. Dataset Update( ) method c. TableAdapter Fill( ) method d. BindingNavigator Save( ) method e. PageLoad( ) event-handler method

4 step solution

Problem 18

In Visual Studio, the tool that enables you to connect to a database and automatically populate a dataset object using a TableAdapter object is the ______________ wizard: a. Data Source Configuration b. Data Source c. Query Builder d. DataSet Designer e. TableAdapter Query Configuration

4 step solution

Problem 19

Which window is used in Visual Studio to display dataset tables so they can be dragged and dropped onto the form? a. Server Explorer b. Properties c. DataSet Designer d. Data Sources e. Solution Explorer

4 step solution

Problem 22

Write SQL statements for the following: a. Retrieve all partNumber and partDescription columns from a Parts table that has 15 different columns. b. Retrieve records from a Parts table for partNumbers 1000 through 2000. Display the partDescription only. c. Insert a new record into a Customer table. Store the following values in the columns: LName=Osprey, FName=Teola, CNumber=23456. The columns are ordered as follows: CNumber, LName, FName.

3 step solution

Problem 25

How does a table adapter differ from a data adapter?

3 step solution

Show/ page
Chapter 14 - C# Programming: From Problem Analysis to Program Design Solutions | StudyQuestionHub