Subject Re: [IBO] UpdateSQL, SP and a parameter
Author Helen Borrie
At 10:00 PM 2/02/2003 +0000, you wrote:
>No, not a typo :) Here I wrote a sample, just to make clear the situation.
>In the real query field names are taken with a copy&paste, and double
>checked, and with a convention that make them easy to read for me
>(field ESERCIZIO_ID, param name P_ESERCIZIO_ID...)
>Anyway, I've checked again, the param is typed right. Also wondering
>why the error is risen opening the query with parameters assigned and
>teh UpdateSQL defines, and not while inserting or if the UpdateSQL is
>blanked.
>Anyway, IBO seems not to find the binding between the updateslq fields
>and the select part of the query, ignoring parameters :(

Oh yes, of course! You are hoping that it will automatically use the same
argument because the parameter names match? I'm sure that the binding
works on the dataset's Row.ByName() column references, not on its
Params[]. So it would pick up the Row.ByName('a').Value, etc.

For the UpdateSQL statement, you will need to bind its input parameter to a
column name that exists in the output set. If there is no output column in
the mother query that corresponds to MyParam, then you would need to find
some other way to pass the current MyQuery.ParamByName('MyParam').Value to
the UpdateSQL procedure as a constant.

Helen