12.4. Commands
Commands – implemented as OleDbCommand and SqlCommand classes – are the only way to execute SQL statements and stored procedures in ADO.NET. Both managed providers implement the IDbCommand interface and inherit the following properties.
CommandText This property (of a String type) specifies the SQL statement, name of the stored procedure or table (for the OLE DB managed provider only) to be executed against the data store. The meaning of the contents of this property depends on the value set for the CommandType property.
CommandTimeout This property (of an Integer type) specifies the number of seconds to wait before terminating the attempt to execute a command and generating an error. The default value is 30 seconds.
CommandType ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access