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.
After establishing a connection to a data source, you can execute commands and return results from the data source using HostFileCommand.
Important
The Managed Provider for Host Files does not support any type of transaction. Therefore, you should try to avoid using INSERT, UPDATE, or DELETE commands on mission-critical data.
Procedure
To execute a command on the host file system
Establish a connection using
HostFileConnection.For more information, see How to Connect to and Disconnect from a Host File System.
Once connected, create a
HostFileCommandobject by usingHostfileConnection.CreateCommand.Use the
HostFileCommandobject to execute commands on the Host File system.HostFileCommandexposes several Execute methods that you can use:When returning results as a stream of data, use
ExecuteDbDataReaderto return aDataReaderobject.Use
ExecuteScalarto return a singleton value.Use
ExecuteNonQueryto execute commands that do not return rows.Use
ExecuteRecordSetto execute commands on a recordset.
Note
When modifying an Alternate Index File (AIX), you may receive an "Invalid record length" error when the Index is defined not to accept duplicate keys. This error may occur because the INDEX of the Alternate Index VSAM file is not large enough to hold multiple key values for the same index record .
See Also
Working with the Managed Data Provider For Host Files
BizTalk Adapter for Host Files Configuration