Other Options For Working With Results Sets

The ITMCoreDataReader interface provides two additional accessor methods which enable programmers to work with the results of a query in different ways.

The method ITMCoreDataReader.GetInternalDataReader() returns the underlying IDataReader instance that is wrapped by the ITMCoreDataReader. For TMCore applications connecting to a Microsoft SQL Server or MSDE database, this IDataReader instance will be an instance of the class System.Data.SqlClient.SqlDataReader. In the future, as other databases are supported, the value returned by this method may be an instance of some database-specific implementation of the IDataReader interface.

Note

Calling the Close() method on the IDataReader returned by GetInternalDataReader() will have the side-effect of closing the ITMCoreDataReader.

The method ITMCoreDataReader.GetDataTable() reads through the rows of the results set and creates and returns a DataTable instance containing all of the results. This method then closes the ITMCoreDataReader, so no further reads are possible. This method can be especially useful when working with data bindings such as in ASP pages.