Subject Re: [IBO] Prepare - Params question
Author Helen Borrie
At 04:33 AM 17/07/2003 +0000, you wrote:
>Hi all,
>
>In the IBO help, it states that if you access the ParamByName
>method, a Prepare is automatically called (if needed), but if you
>access the Params array, you must explicitly ensure the query is
>prepared, before accessing the array.
>
>Is there any other issues with using ParamByName?
>I have been using Params (with a preceding check on Prepared), but I
>am thinking I may go to ParamByName, but would like to know about
>any other little things, if there are any.
>
>I'm asking because I'm aware using FieldByName has more overhead
>than the Fields array.
>Is it similar with ParamByName?

Yes, an extra processing cycle or two. Both params[] and fields[] are
TIB_Row, so their methods are the same. But, until Firebird 1.5,
ParamByName has generally been safer than params[] because of an
inconsistency in the return order of output parameters. If you haven't had
problems so far with Params[n] apparently mismatching data types, then you
probably haven't hit the problem. I say "probably" because I'd be nervous
if most of your params are of the same datatype and you haven't been
validating things at the API.

Helen