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
DatabaseandTransactionproperties of the stored procedure component to the names of the database and transaction components. - 3. Set the
DatabaseNameproperty in theDatabasecomponent. - Normally you should specify the
DatabaseNameproperty, 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 theDatabaseNameand 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
StoredProcNameproperty to the name of the stored procedure to use. If you provided a value for theDatabaseproperty, and theDatabasecomponent is connected to the database, then you can select a stored procedure name from the drop-down list for the property. A singleTIBStoredProccomponent can be used to execute any number of stored procedures by setting theStoredProcNameproperty to a valid name in the application. It may not always be desirable to set theStoredProcNameat design time. - 5. Double-click the
Paramsproperty 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 theDatabaseNameproperty 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.