What is a data provider? (3)
What data providers is ADO.NET working with? (4)
SQL
Oracle
ODBC
OleDb
What is the namespace for SQL and what database is it connecting to?
System.Data.SqlClient
MS SQL Server
What is the namespace for Oracle and what database is it connecting to?
System.Data.OracleClient
Oracle
What is the namespace for ODBC and what database is it connecting to? (3)
System.Data.ODBC
What is the namespace for OleDb and what database is it connecting to?
System.Data.OleDb
Access, Excel
What common inheritance do all data providers share?
System.Data.Common
Which classes does System.Data.Common always contain? (4)
DBConnection
DBCommand
DBDataReader
DBParameter
What does the DBConnection class do?
What is the purpose of the DBCommand class?
What does the DBDataReader class do?
What is the DBParameter class used for?
List the common steps to connect to a database? (5)
Why do you have to create a connection object to connect to a database? (3)
What are the steps required to open a SQL connection? (5)
Why do you have to create a Command object to open a database connection? (3)
What are the 3 main methods of SqlCommand and what do they do?
ExecuteNonQuery – used to modify data via inserts, updates and deletes
ExecuteReader – executes the query and reads the returned results
ExecuteScalar – used to get a single returned value
What are the most commonly used properties of SqlCommand? (4)
CommandType
CommandText
Connection
Parameters
What is the CommandType of SqlCommand?
What does the SqlCommand property CommandText do?
What does the SqlCommand Connection property do?
What does the SqlCommand Parameters property do?
Give the 2 most used constructors in SqlCommand? (4)
SqlCommand();
SqlCommand(“Select * From TableName”, conn);
What is the SqlDataReader for? (4)