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 toHostFileCommand.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, theDBDataReaderobject 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, callDBDataReader.Close.If your
HostFileCommandobject contains output parameters or return values, they will not be available until theDBDataReaderis closed.Note that while
DBDataReaderis open, theHostFileConnectionis in use exclusively by thatDBDataReader. You cannot execute any commands for theHostFileConnection, including creating anotherDBDataReader, until the originalDBDataReaderis closed.
See Also
Retrieving Information from the Host File System
BizTalk Adapter for Host Files Configuration