Subject | Re: [IBO] Set parameter for Stored Procedure |
---|---|
Author | Helen Borrie |
Post date | 2003-09-09T08:43:51Z |
At 09:57 PM 8/09/2003 +0200, you wrote:
matching parameters to the linked update object. This is all fine, as long
as the dataset is able to provide a set of fields that match the set of
parameters of the update object.
Include the field ChangeAll in the dataset as a client-side calculated
field. Do you know how to do that?
Then, in the dataset editor, set up its ColumnAttributes so that it is a
Boolean with a True value 1 and False value 0; set its default value to 0
and set its Required property to True (to avoid having the "grey" null
value in the cycle).
That will cause it to display in a grid as a checkbox; or, on a form
layout, you can display it in a TIB_Checkbox. You don't need to do any
OnCalculatedFields stuff: it is sufficient for the calc field to be there
and for the GUI value to be set by the user.
[ I set up a little project to do what you want to do. Its fine; but I
did bump into the parameter ordering problem with Fb 1.5. If you are using
Fb 1.5, do make sure that you have the OldParameterOrdering parameter
active and set true in firebird.conf. BEFORE you try to do any of the above
stuff in your app]
Helen
> > Can you represent it as a logical True/False or Yes/No? If so, just use aThe problem is that you are using the built-in capability of IBO to pass
> > regular TCheckBox, with a suitable caption, e.g. 'Gift-wrapping
> > required'. Then, when applying values to parameters, read the Checked
> > property and apply 0 or 1 accordingly.
>
>The problem I have is not so much retrieving the value within the program
>but to pass it to the Query/SP.
>
>Right now the EditSQL of the query looks like this:
>EXECUTE PROCEDURE KOMMUNIKATIONAENDERN(
> :ChangeAll, <------------ NOT from a
>table
> :TABKOMMUNIKATION.KOMMID,
> :TABKOMMUNIKATION.KOMARTID,
> :TABKOMMUNIKATION.KOMMDETAIL,
> :TABKOMMUNIKATION.KOMMREMARK,
> :TABPERSONEN.PERSID)
>
>When it comes to retrieving data with this query it get the error:
>Invalid custom DML column reference: ChangeAll
>Even when I hardwire it to a value, it does not seem to have an effect. When
>I check the statement sent to the server using the monitor, all params but
>the first one are assigned, the first one is not even listed.
>
>I have the feeling tha t I miss something fundamental here.
matching parameters to the linked update object. This is all fine, as long
as the dataset is able to provide a set of fields that match the set of
parameters of the update object.
Include the field ChangeAll in the dataset as a client-side calculated
field. Do you know how to do that?
Then, in the dataset editor, set up its ColumnAttributes so that it is a
Boolean with a True value 1 and False value 0; set its default value to 0
and set its Required property to True (to avoid having the "grey" null
value in the cycle).
That will cause it to display in a grid as a checkbox; or, on a form
layout, you can display it in a TIB_Checkbox. You don't need to do any
OnCalculatedFields stuff: it is sufficient for the calc field to be there
and for the GUI value to be set by the user.
[ I set up a little project to do what you want to do. Its fine; but I
did bump into the parameter ordering problem with Fb 1.5. If you are using
Fb 1.5, do make sure that you have the OldParameterOrdering parameter
active and set true in firebird.conf. BEFORE you try to do any of the above
stuff in your app]
Helen