When an instance of OleDbCommand is created, the read/write properties are set to their initial values. For a list of these values, see the OleDbCommand constructor.
OleDbCommand features the following methods executing commands at a data source:
| Item | Description |
| ExecuteReader | Executes commands that return rows. ExecuteReader may not have the effect that you want if used to execute commands such as SQL SET statements. |
| ExecuteNonQuery | Executes commands such as SQL INSERT, DELETE, UPDATE, and SET statements. |
| ExecuteScalar | Retrieves a single value, for example, an aggregate value from a database. |
You can reset the CommandText property and reuse the OleDbCommand object. However, you must close the OleDbDataReader before you can execute a new or previous command.
If a fatal OleDbException (for example, a SQL Server severity level of 20 or greater) is generated by the method executing an OleDbCommand, the OleDbConnection, the connection may be closed. However, the user can reopen the connection and continue.