Subject Re: [IBO] params given sequence
Author Helen Borrie
At 01:24 PM 28/10/2004 +0000, you wrote:

>what sequence is for passing parameters to SP? is first try to locate
>dataset field with the given name and if not found then parameter?

No, it is much more exact that that. The input parameters are
Params[]. If the stored procedure has return values, then they are
Fields[]. Both are row objects, which are zero-based arrays of TIB_Column.

>for example: execute procedure sp_insert( :data_name )

data_name is Params[0] or ParamByName('data_name'). You can use any
parameter name you like - it doesn't have to be the name that is used in
the CREATE PROCEDURE definition. It *does* have to be the correct data type.

>if data_name isn't a dataset's field, look for this parameter in the
>params list?

No, nothing of that sort. If you use a SP for your XxxxxSQL statements, it
must be an executable procedure and you should match the parameter names
that you use to the field names in the dataset.

For "stand-alone" executable SPs (those that are not bound to the XxxxSQL
properties of a dataset) you can use any names you like for the params.

For both executable and selectable SPs, you should read the actual names of
the return values from the Fields[] array.

>do I need to use calculatedfields for data_name

Certainly not.