Implementing a Custom Command

When you think about implementing a custom data provider, you should usually start your thinking at the command level. The command is the workhorse of the entire provider. When a DataAdapter fills a DataSet, it uses a command to generate a DataReader that is then used to populate the DataSet. The command utilizes the existing connection to perform the actual data operation, including sending parameters, obtaining results, and populating output parameters.

The IDbCommand Interface

The IDbCommand interface defines the properties and methods listed in Table 28.4.

Table 28.4. Properties and Methods of the IDbCommand Interface
Property or MethodDescription
CommandTextThe text of the command. In most implementations, this ...

Get Microsoft® Visual C#® .NET 2003 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.