Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Just as you can do with other managed data providers, you can access host data with an implementation of a DataReader object through HostfileCommand.
To retrieve data using a data reader
- Create an instance of - HostFileCommand.
- Create a - DataReaderobject through a call to- HostFileCommand.ExecuteDBDataReader.- Calling - ExecuteDBDataReaderretrieves data rows from the data source.
- Use - DBDataReader.Readto obtain a row from the results of the query.- You can access each column of the returned row by passing the name or ordinal reference of the column to the - DBDataReaderobject. However, for best performance, the- DBDataReaderobject provides a series of methods that enable you to access column values in their native data types (- GetDateTime,- GetDouble,- GetGuid,- GetInt32, and so on).
- Once you are finished with the - DBDataReaderobject, call- DBDataReader.Close.- If your - HostFileCommandobject contains output parameters or return values, they will not be available until the- DBDataReaderis closed.- Note that while - DBDataReaderis open, the- HostFileConnectionis in use exclusively by that- DBDataReader. You cannot execute any commands for the- HostFileConnection, including creating another- DBDataReader, until the original- DBDataReaderis closed.
See Also
Retrieving Information from the Host File System
BizTalk Adapter for Host Files Configuration