MCSD.NET - 70-306 Exam Question:
Download Questions PDF

Suppose You execute a query on your external Oracle database named XYZSalesDate by using an
OleDbCommand object. The query uses the Average function to return a single value that
represents the average price of products in the inventory table. You want to optimize performance
when you execute this query.
To execute this query from your ADO.NET code, you need to use a method of the
OleDbCommand object. Which method should you use?
A. ExecuteNonQuery
B. ExecuteScalar
C. ToString
D. ExecuteReader

Answer:

B. ExecuteScalar

Download MCSD.NET - 70-306 Exam Interview Questions And Answers PDF

Previous QuestionNext Question
Suppose You develop a Windows-based application XYZiApp by using Visual Studio .NET. XYZiApp uses
a SqlConnection object for database access.
You typically run XYZiApp on a computer that has limited RAM and hard disk space. After the
code finishes using the SqlConnection object, you must ensure that the connection is closed and
that any resources consumed by the object are released immediately.
What should you do?
A. Call the Finalize method of the SqlConnection object.
B. Call the Dispose method of the SqlConnection object.
C. Set the SqlConnection object equal to Nothing.
D. Set the SqlConnection object equal to
Suppose You develop a Windows-based application XYZApp that includes several menus. Every top-level
menu contains several menu items, and certain menus contain items that are mutually exclusive.
You decide to distinguish the single most important item in each menu by changing its caption
text to bold type.
What should you do?
A. Set the DefaultItem property to True.
B. Set the Text property to ?<b>True</b>?.
C. Set the Checked property to True.
D. Set the OwnerDraw property to True.