The CommandType property can be set to ___________ when executing a text-based SQL query.
- StoredProcedure
- TableDirect
- Text
- Function
The correct option is Text. When executing a text-based SQL query using ADO.NET, you can set the CommandType property of the command object to Text. This indicates that the command text contains a SQL query statement to be executed directly against the database. Setting the CommandType to Text is appropriate for executing dynamic SQL queries or stored procedures that return rows.
Loading...
Related Quiz
- What is the significance of the "ToList()" method in LINQ to Entities?
- Which ADO.NET method is used to add parameters to a SqlCommand object?
- Which ADO.NET class is responsible for transferring data between a data source and a data-bound control?
- How can you define complex queries involving multiple tables in LINQ to Entities?
- In LINQ, what is the primary purpose of the join clause?