I'm not sure if this answers your question but here goes:
Connection and DataReader classes come in pairs on the .NET Framework, depending on the database technology used. So you have OdbcConnection
and OdbcDataReader
, also SqlConnection
and SqlDataReader
, etc. You have always to use them in pairs. Note anyway that all of these implement the common interfaces IDataConnection
and IDataReader
.
EDIT. Fine, I completely misunderstood the question. :-/
I usually use C#, not C++, but I think that it is because you can directly create a new instance of OdbcConnection
, but as for the OdbcDataReader
, you need to obtain an instance by executing the ExecuteReader
method on the corresponding OdbcCommand
. ExecuteReader returns a pointer to a new OdbcDataReader object.