Creating a Stored Procedure Component
From InterBase
Go Up to Using a Stored Procedure
To create a stored procedure component for a stored procedure on a database server:
- 1. Place stored procedure, database, and transaction components from the InterBase page of the Tool Palette in a data module.
- 2. Set the
Database
andTransaction
properties of the stored procedure component to the names of the database and transaction components. - 3. Set the
DatabaseName
property in theDatabase
component. - Normally you should specify the
DatabaseName
property, but if the server database against which your application runs is currently unavailable, you can still create and set up a stored procedure component by omitting theDatabaseName
and supplying a stored procedure name and input, output, and result parameters at design time. For more information about input parameters, see Using Input Parameters. For more information about output parameters, see Using Output Parameters. For more information about result parameters, see Using the Result Parameter. - 4. Optionally set the
StoredProcName
property to the name of the stored procedure to use. If you provided a value for theDatabase
property, and theDatabase
component is connected to the database, then you can select a stored procedure name from the drop-down list for the property. A singleTIBStoredProc
component can be used to execute any number of stored procedures by setting theStoredProcName
property to a valid name in the application. It may not always be desirable to set theStoredProcName
at design time. - 5. Double-click the
Params
property value box to invoke the StoredProc Parameters editor to examine input and output parameters for the stored procedure. If you did not specify a name for the stored procedure in Step 4, or you specified a name for the stored procedure that does not exist on the server specified in theDatabaseName
property in Step 3, then when you invoke the parameters editor, it is empty.
See “Working with Stored Procedures” in the Data Definition Guide for more information.
Note:
If you do not specify the
If you do not specify the
Database
property in Step 2, then you must use the StoredProc Parameters editor to set up parameters at design time. For information about setting parameters at design time, see Setting Parameter Information at Design Time.