Using TSQLStoredProc (Procedure)

From RAD Studio
Jump to: navigation, search

Go Up to Using dbExpress


TSQLStoredProc represents a stored procedure that is executed using dbExpress. TSQLStoredProc can represent the result set if the stored procedure returns a cursor. You can add a TSQLStoredProc component to a form at design time, or create one dynamically at run time.

To use TSQLStoredProc

  1. From the dbExpress category of the Tool Palette, drag a TSQLStoredProc component to the form.
  2. In the Object Inspector, set its Name property to a unique value appropriate to your application.
  3. Set the SQLConnection property.
  4. Set the StoredProcName property to specify the stored procedure to execute.
  5. If the stored procedure returns a cursor to be used with visual data controls, add a data source component to the form.
  6. Set the DataSet property of the data source component to the stored procedure-type dataset.
  7. Provide input parameter values for the stored procedure, if necessary.
  8. To execute the stored procedure that returns a cursor, use the Active property or call the Open method.
  9. Process any results.

See Also