180 likes | 300 Views
This overview of ADO.NET covers essential components like connection strings, command objects, and data retrieval methods. It explains key aspects such as the absence of a username or password in a connection string, the use of DataAdapter to manage data, and how to access data using methods like ExecuteScalar and Fill. Additionally, it addresses the importance of DataRow state and provides insights on binding controls to DataTables. With a focus on practical usage, this guide is suitable for developers looking to enhance their understanding of ADO.NET functionality.
E N D
The connection string does not contain the following • Username • Password • SQL • Provider • Datasource
To return only one value from a query, use the ___________ method. • ExecuteNonQuery • ExecuteReader • ExcecuteItem • ExecuteScalar
The DataAdapter object • Is used to store Table results • Contains the Select, Update, Delete and Insert SQL • Is the translator for the client SQL • Is used when accessing multiple tables
To use the DataTable.Load method, you need a • DataReader object • DataAdapter • DataExecutive • DataDATAtool
To get data using a DataAdapter use this method • Get • Fill • Retrieve • Execute
The DataRow.RowState tells us • If the row is unchanged • If the row is inserted • If the row is deleted • If the row is proposed • All of the above
To get rows of a table that have changed, use • .Changes • .Update • .GetChanges • .HasChanges
To check if there are any rows of a table that have changed, use • .Changes • .Update • .GetChanges • .HasChanges
To access a specific field in a table, code the following • table.current.col • table.rows.col.item • table.rows(x).col(“FieldName”) • table.rows(x).item(“FieldName”)
DataSets hold • Sets • DataAdapters • DataSet Objects • DataTables
The CurrencyManager objects is derived from the____________ class. • BindingContext • ContextManager • BindingManager • DataContext
A command object requires • SQL and a Connection Object • SQL • A Connection • A DataReader
The unique identifier for a record in a table is • The Primary Index • The Foreign Key • The Primary Key • The Foreign Index
The connection may be used by • a DataAdapter • a Command Object • Neither • Both
When using a datareader, to get the contents of the second column of a datatable (of type string) use... • rdr.GetString(2) • rdr.GetValue(2,”String”) • rdr.GetString(1) • rdr.Read(1)
Datatables are made up of • DataSets • DataRows and DataColumns • DataAdapters • Hopes and Dreams
To bind a Combox to a DataTable, set the following... • DataSource, DisplayMember & ValueMember • DataSource • DisplayMember • ValueMember