RAD Studio
ContentsIndex
PreviousUpNext
Representing the Results of a Stored Procedure

Stored procedures are sets of SQL statements that are named and stored on an SQL server. How you indicate the stored procedure you want to execute depends on the type of unidirectional dataset you are using. 

When using TSQLDataSet, to specify a stored procedure:

  • Set the CommandType property to ctStoredProc.
  • Specify the name of the stored procedure as the value of the CommandText property:

SQLDataSet1.CommandType := ctStoredProc;
SQLDataSet1.CommandText := 'MyStoredProcName';

 

SQLDataSet1->CommandType = ctStoredProc;
SQLDataSet1->CommandText = "MyStoredProcName";

When using TSQLStoredProc, you need only specify the name of the stored procedure as the value of the StoredProcName property.

SQLStoredProc1.StoredProcName := 'MyStoredProcName';

 

SQLStoredProc1->StoredProcName = "MyStoredProcName";

After you have identified a stored procedure, your application may need to enter values for any input parameters of the stored procedure or retrieve the values of output parameters after you execute the stored procedure. See Working with stored procedure parameters for information about working with stored procedure parameters.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!