Using a query to execute a stored procedure
If your database permits the execution of a SELECT statement in a stored procedure or function and can return values through subsequent row fetches, you can specify a procedure call using the native database syntax in the Query field of the New Query or Edit/View Query dialog using the Database Interface Designer.
For example, to call a stored procedure by means of ODBC using the native syntax, the query text you enter in the New Query or Edit/View Query dialog might be:
{call MyProc(-1)}
The query text for a call to a stored procedure must be in the native database syntax. For more information about the correct syntax of the procedure call using your particular database adapter, see the database-specific adapter reference guide.
To define a query using a stored procedure:
When you use a stored procedure to define a query, follow the same steps as when you use a SELECT or other statement:
- Define the query in the New Query or Edit/View Query dialog of the Database Interface Designer.
- Generate a type tree from the query.
- In the Map Designer, specify the query when defining the data source for the executable map input card for the stored procedure.