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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.