Question: 1.Which ADO.NET object is a forward only cursor and is connected to the database while the cursor is open? a.DBDataReader b.DataSet c.DataTable d.DataAdapter 2.Which ADO.NET

1.Which ADO.NET object is a forward only cursor and is connected to the database while the cursor is open?
a.DBDataReader
b.DataSet
c.DataTable
d.DataAdapter
2.Which ADO.NET Command object's property would you use when a query returns the SUM of a column in a table?
a.ExecuteNonQuery
b.ExecuteDataReader
c.ExecuteScalar
d.Execute
3.Which ADO.NET object is a fully traversable cursor and is disconnected from the database?
a.DBDataReader
b.DataSet
c.DataTable
d.DataAdapter
4.Which method of a DataAdapter is used to populate a DataSet?
a.Populate
b.Fill
c.Load
d.DataSets[0].Fill
5.Which property of an ADO.NET DataAdapter is used to insert records in a database?
a.InsertText
b.InsertType
c.InsertCommand
d.InsertDataTable
6.Which ADO.NET Command object's property would you use when a query returns the SUM of a column in a table?
a.ExecuteNonQuery
b.ExecuteDataReader
c.ExecuteScalar
d.Execute
7.When using the ADO.NET Entity Framework you create a Model that represents the object in the database. What class does the Model inherit from?
a.DBContext
b.DBSet
c.Model
d.Connection
8.How are stored procedures represented in the ADO.NET Entity Framework?
a.A class is created with the same name as the stored procedure, and the Execute method is implemented.
b.A method is added to the Model that is the same name as the stored procedure.
c.Stored procedures cannot be called from the ADO.NET Entity Framework.
d.A method is created in the entity class for the table in the stored procedure.
9.Which code uses the ADO.NET Entity Framework to add a record to the database?
a. using (NorthwindsEntities db = new NorthwindsEntities())
{
Category category = new Category()
{
CategoryName = "Alcohol",
Description = "Happy Beverages"
};
db.Categories.Add(category);
db.SaveChanges();
}
b. using (NorthwindsEntities db = new NorthwindsEntities())
{
Category category = new Category()
{
CategoryName = "Alcohol",
Description = "Happy Beverages"
};
db.Categories.Add(category);
db.InsertRecords ();
}
c. using (NorthwindsEntities db = new NorthwindsEntities())
{
Category category = new Category()
{
CategoryName = "Alcohol",
Description = "Happy Beverages"
};
db.Categories.Insert (category);
db.SaveChanges();
}
d. using (NorthwindsEntities db = new NorthwindsEntities())
{
Category category = new Category()
{
CategoryName = "Alcohol",
Description = "Happy Beverages"
};
db.Categories.Insert(category);
db.InsertRecords();
}
10.Which code uses the ADO.NET Entity Framework to update a record in the database?
a. Category category = db.Categories.First(c => c.CategoryName == "Alcohol"); category.Description = "Happy People"; db.UpdateRecords ();
b. Category category = db.Categories.First(c => c.CategoryName == "Alcohol"); category.Description = "Happy People"; db.Categories.UpdateRecords();
c. Category category = db.Categories.First(c => c.CategoryName == "Alcohol"); category.Description = "Happy People"; db.SaveChanges();
d.Category category = db.Categories.First(c => c.CategoryName == "Alcohol"); category.Description = "Happy People"; db.Categories.SaveChanges();

Step by Step Solution

3.33 Rating (171 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1Which ADONET object is a forward only cursor and is connected to the database while the cursor is open aDBDataReader bDataSet cDataTable dDataAdapter ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

1013-C-S-O-S (707).docx

120 KBs Word File

Students Have Also Explored These Related Operating System Questions!