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
- You are working on a project where database performance is critical. Which LINQ feature or technique would you consider using to minimize the number of database queries generated by LINQ?
- The ExecuteNonQuery method of a command object is typically used for executing _______ SQL commands.
- In WinForms, which event is often used to trigger data binding updates?
- When working with multiple related DataTables, what ADO.NET feature allows you to define relationships between them?
- In WinForms, what are the key steps involved in setting up data binding for a control?