Call stored procedures

To use stored procedures in your applications, you must set some properties of the IfxCommand object.

Set the following properties of the IfxCommand object as shown:
  • CommandText - set to the name of the stored procedure
  • CommandType - set to StoredProcedure

You can use the IfxCommandBuilder.DeriveParameters method to retrieve information about parameters for stored procedures.

If a stored procedure returns a value, your application must add a parameter for this to the parameter collection used by the IfxCommand object.

The topic Call a stored procedure includes an example that shows how to run a stored procedure and read any results that it returns.