ADO.NET 2003 Test
A banking application is online. As soon as Martin finished his session, Lisa logged on and did some banking. The connection string created for each of them is as follows: String ConnStr= "Server=...
A stored procedure called 'FirstQTR' is used for generating the sales report of the first quarter. Apart from other data, it returns the total sale seperately to make a hyperlink. For this purpose ...
A stored procedure takes a single parameter (storeid) and returns the product sales for that store. The user can view the sales for that store. Which ADO object should you use to execute the Sp_sto...
ADO.NET 2.0 has a new feature that allows you to run more than one DataReader from the same connection at the same time. Which of the following properties must be true for multiple DataReaders?
ADO.NET 2.0 provides a simple way of copying the complete table from one data source(/database) to another. What is the class providing this functionality known as?
ADO.NET 2.0 provides a way to get all the data from data reader into a DataTable. How is this special functionality invoked?
ADO.NET is known for disconnected data extraction. Which of the following does not use the disconnected mechanism while extracting data from the database?
Asynhronous execution is supported in ADO.NET 2.0 for ExecuteReader, ExecuteScalar, and ExecuteNonQuery.
BrainGrip has a class called DBConnectivity. Every page of the site is using this class to get the connection object. You are using SQL Server 2005. Imports System.Data.OleDB Imports System.Web N...
DataSet is a sort of virtual database which can maintain tables as well as relationships. Which of the following have correct parameters for the add method of the relations collection? (Select all ...
How can you make a data reader close connection automatically?
How you can you verify whether a dataset has changed?
One of your forms displays the list of all the Customers in a list box and all their details in the text boxes. On selecting a Customer in the list box, text boxes should show details of that custo...
PreFin101.com has a guest book which uses an XML document. Initially, an XML file is uploaded into the datatable. As records increase, the 'GuestID' column should be incremented. Which properties o...
Premium Corporation is running an insurance business. They are planning to create a website to automate the business. An aspx page, Sales.aspx will display the sales generated by an executive. The ...
Premium Finance Corp is involved in the savings business with branches all over the country. They provide flexible schemes which can be designed according the client's requirements. A dataset maint...
Premium Finance Corp is running a home loans business. Sometimes a client just wants to see his total amount paid. For this, the application runs a query which returns a single value. Which of the ...
Premium Finance Corp is running a home loans business. They are planning to create a website to automate the business. An aspx page, Sales.aspx will show the sales made by an executive through a da...
Read the following statement: DataTable.Select (String, String) Here, the first parameter accepts a criteria for filtration, what does the second parameter do?
Read the following statements: Dim employeeDS As DataSet employeeDS.Tables.Add(new DataTable("FirstQTR")) What will be the result of above code?
Read the following statements: DataRow oDetailsRow = oDS.Table["OrderDetails"].NewRow(); oDetailsRow["ProductId"] = 1; oDetailsRow["ProductName"] = "Product 1"; What is wrong with this code?
Read the following statements: DataRow oDetailsRow = oDS.Tables["OrderDetails"].Row(); oDetailsRow["ProductId"] = 1; oDetailsRow["ProductName"] = "Product 1"; What is wrong in this code?
Read the following statements: Dim dr As DataRow Dim objCustReader As Data.SqlClient.SqlDataReader Dim dtCustomers As DataTable With dtCustomers.Columns.Add(New DataColumn("Customer ID") End With...
Read the following statements: Dim dr As DataRow Dim objCustReader As Data.SqlClient.SqlDataReader Dim dtCustomers As DataTable With dtCustomers.Columns.Add(New DataColumn("Customer ID")) End Wit...
Read the following statements: OleDbDataAdapter oOrderDetailsDataAdapter; OleDbCommandBuilder oOrderDetailsCmdBuilder = New OleDbCommandBuilder(oOrderDetailsDataAdapter); oOrderDetailsDataAdapter...
The data from a DataTable named "Dealers" is retrieved in a DataSet named "ds". Following is the structure of the table as used in the DataTable: Dealer -------------------- DealerID -Primary Key ...
The DataSet object can extract data from an XML file. The ReadXML method accepts the source as a parameter and returns a value from the xmlReadMode enumeration. Which of the following is an invalid...
The WriteXml method of a DataSet writes the data of the DataSet in an XML file. WriteXml accepts a parameter for the different types of destinations. Which of the following is an invalid type for t...
Two users, Monique and James are using ADO.NET MIS system. The data refresh time in the system is set to 15 minutes. James changed the mailing address of a customer named Majda, and updated the dat...
We are iterating through the results received in a data reader named 'DReaderOrder,' which is created by using connection 'SqlCon.' In between, we need to retrieve some more values from the databas...
We are iterating through the results received in a data reader named 'DReaderOrder,' which is created by using the connection 'SqlCon.' In between we need to retrieve some more values from the data...
What are the core components of .Net framework data provider model?
When users edit data in your program, the code runs to completion without error, but no data changes appear in the database. You test the update query and the connection string that you are passing...
Which of the following are invalid values of a Dataset's SchemaSerializationMode property?
Which of the following are true Serializable objects (i.e. they implement ISerializable interface)?
Which of the following are used for database connections between SQL Server and ASP.NET?
Which of the following are valid methods of the SqlTransaction class?
Which of the following can not be bound?
Which of the following command types are provided by an oledb and sql provider?
Which of the following is capable of returning multiple rows and multiple columns from the database?
Which of the following is not a member of the CommandType enumeration?
Which of the following is not a valid member of DataAdapter?
Which of the following is not a valid method of DataAdapter?
Which of the following is not a valid property of the connection object?
Which of the following is not associated with the command��object in ADO.NET 2.0?
Which of the following is not correct about DataReader?
Which of the following is not correct with regard to DataReader and DataSet?
Which of the following is not true about CommandType.TableDirect?
Which of the following is the parent class of DataAdapter?
Which of the following methods ensures optimum use of Connection Pooling?
Which of the following methods is ideally suited for retrieving a single row and single column from the database?
Which of the following options is ideally suited for managing database connections?
Which of the following options should you use to copy the edited rows from a dataset called ProductInfo into another dataset called ProductChanges?
Which of the following overloaded methods is provided with data table object for sorting and filtering data?
Which of the following represents the possible values for the 'DataRowVersion' class?
Which of the following statements are correct? (a)A DataReader doesn't have an iterator or a rows collection (b)When DataReader reaches the last row, its Read() method will return false
Which of the following statements are correct? (a)SQL statements are generally faster than stored procedures (b)The database engine works out the execution plan for SQL statements at run time
Which of the following statements is correct with regard to a CommandBuilder object?
Which of the following statements is correct with regard to transaction?
Which of the following statements is incorrect with regard to a CommandBuilder object?
Which of the following statements is incorrect with regard to ADO?
Which of the following statements is true with regard to DataRow and DataRowView?
Which of the following statements with regard to DataSet is correct?
Which of the following types of cursors is available with ADO.NET DataReader object?
Which of the following was not among the main design goals behind ADO NET?
You are developing a website that has four layers. The layers are: user interface (web pages), business objects, data objects, and the database. You want to pass data from the database to controls ...
You are using Visual Basic to retrieve class information from a Microsoft SQL Server database named ClassList. The database resides on a server named Neptune. Which code fragment will create a conn...
You defined a data adapter as follows: Dim adap As New SqlDataAdapter("select * from products;select * from customers", New SqlConnection(ConnectionString)) Dim DataSet As New DataSet adap.Fill(Da...
You have a data table named 'DTable.' You are writing a sub routine to validate the changes made by the user. Which of the following would you use to get the changed table data?
You have a data table named 'ProdDT' and its modified version named 'ModProdDT.' Which of the following would you use to update the changes, using 'ProdAdp' adapter and 'DS' data set?
You have a table named 'FirstQTR' and want to create another table 'SecondQTR' which is exactly the same as 'FirstQTR', including DataTable schema and constraints. Which of the following methods fu...
You have added some rows to the existing datatable in the dataset. Which of the following methods would you invoke?
You have created an SqlCommand object as shown below by passing the sql query and the connection object. Dim cmd as New SqlCommand("Select CategoryID, CategoryName FROM Categories", con) Which of t...
You have defined a command named 'cmdA' and an open connection named 'con'. You created a new transaction: Dim trans As SqlClient.SqlTransaction = Nothing How will you assign the command to the t...
You have defined an SQL Command object named "sqlComm" to run a stored procedure. The OUT parameter is as follows: Dim pm2 As New SqlParameter("@Amount," SqlDbType.Money) How will you add the OUT...
You have following data table structure: Sales ----------- SalemanId OrderId Price How will you calculate the total amount generated by a salesman (with SalemanID =2201) if the name of DataTable ...
You have got a supplier data table named "DTSupp." To display records specifically with sorting, you employed a dataview as follows: Dim DataViewSupp As DataView = DTSupp.DefaultView What is the ...
You have got the data view of the customer table named "ViewCust." Before displaying the records in the grid, you want to retrieve the CustomerIDs with a value less than 50. How will you do this?
You have to retrieve the details of some members from the 'Member' table. The data reader is executed to get the values. Which of the following helps go through the results?
You have to update some values in the database. Which of the following methods would you execute on a command object named "cmdUpdate?"
You have two parent and child data tables named 'DTOrder' and 'DTOrderDetail' respectively. Both are stored in a data set named 'DS.' How will you make a relation 'DTOrder2DTOrderDetail' between th...
You have written a function to generate a unique bill number for every new bill: 1 Public Function getNewBillNo() As Integer 2 Dim cm As New SqlCommand("select max(billno) from bill", con) ...
You must create a stored procedure to retrieve the following details for the given customer: CustomerName, Address, PhoneNumber Which of the following is an ideal choice to get the result?
You use a Command object to retrieve employee names from the employee table in the database. Which of the following will be returned when this command is executed using the ExecuteReader method?