PdfPrep.com

Which of the following statements will Peter use to set the CommandText and Connection properties to accomplish the required task?

Peter works as a Software Developer for PaulTech Inc. He develops an application for office management, using Visual C# .NET. He creates an OleDbConnection object, named Pcon. He wants to create an OleDbCommand object to retrieve employee details.

Which of the following statements will Peter use to set the CommandText and Connection properties to accomplish the required task? Each correct answer represents a part of the solution. Choose three.
A . OleDbCommand PCommand = new OleDbCommand("sp_GetDetails", PCon);
B . PCommand.CommandType = "SELECT * FROM Employees";
C . PCommand.Connection = Pcon;
D . PCommand.CommandText = "SELECT * FROM Employees";
E . PCommand.SetConnection (PCon);
F . OleDbCommand PCommand = new OleDbCommand();

Answer: C,D,F

Exit mobile version