GIAC
GSSP-NET · Question #207
GSSP-NET Question #207: Real Exam Question with Answer & Explanation
The correct answer is C. StudentCommand.CommandType = CommandType.Text;. See the full explanation below for the reasoning.
Question
You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Windows application using the .NET Framework. You create a database to maintain the record of the students. You create a table named Student. You want to retrieve names and roll number of those students whose age is less than ten years. An instance of the SqlCommand class named StudentCommand is already created. Which of the following code segments should you use to execute the query?
Options
- AStudentCommand.CommandType = CommandType.StoredProcedure;
- BStudentCommand.CommandType = CommandType.StoredProcedure;
- CStudentCommand.CommandType = CommandType.Text;
- DStudentCommand.CommandText = CommandText.Text;
Community Discussion
No community discussion yet for this question.