The OracleParameter class is complementary to the OracleCommand class to
provide run-time parameters along with their values to SQL queries or stored
procedures. You can even work with different types of stored-procedure
parameters like IN, OUT, or IN OUT. It is also mostly used whenever you want to
execute the same SQL command frequently or continuously.
The OracleDataReader class is simply a read-only and forward-only result set. As
the data retrieved using this class is non-updatable and only
forward-navigable, this is the fastest retrieval mechanism available. The most
important point to remember while using OracleDataReader is that it needs a
dedicated connection to Oracle database while it retrieves information. It is
best used to fill in drop-down lists, data grids, etc. It works in conjunction
with OracleCommand to connect to and retrieve information from Oracle database.
The OracleDataAdapter class is mainly used to populate datasets or data tables
for offline use (disconnected use). The OracleDataAdapter simply connects to
the database, retrieves the information (or data), populates that information
into datasets or data tables, and finally disconnects the connection to the
database. It works with OracleConnection to connect to Oracle database. It can
also work with OracleCommand if necessary.
|