Subject Re: [IBO] Behaviour of TIB_UpdateBar
Author Helen Borrie
At 03:34 PM 25/05/2004 +0200, you wrote:
>hello Helen,
>
>ok, let's resume:
>
>The SQL statement of the query connected to the datasource that is
>connected to the grid, navigation bar and update bar is this (as you
>can see, I have removed the "FOR UPDATE..." statement:
>
>SELECT CMPL.Rejected, CMPL.Rejection_Reason, CMPL.Checked ,
> CMPL.COMPLAIN_DATE CMPL_DATE, COMP.Call_Sign COLL_CALL,
> CMPL.Complainer_Call_Sign_In_Qso COLL_CALL_QSO,
> ANAG.Call_Sign CMPL_CALL, CMPL.Call_Sign_In_Qso CMPL_CALL_QSO,
> CMPL.Qso_Date, CMPL.Qso_Time, ENT.Entity_Name, CMPL.Contibution,
> ANAG.Qsl_Manager STD_QMAN, CMPL.Qsl_Manager ALT_QMAN,
> ANAG.Mail_Manager STD_MMAN, CMPL.Mail_Manager ALT_MMAN,
> CMPL.ID_TEMP_COMPLAIN FROM TEMP_COMPLAINS CMPL
>JOIN TEMP_COMPLAINERS COMP ON COMP.ID_TEMP_COMPLAINER =
>CMPL.ID_COMPLAINER
>JOIN TEMP_ANAGRAPHICS ANAG ON ANAG.ID_TEMP_ANAGRAPHIC =
>CMPL.ID_ANAGRAPHIC
>JOIN ENTITIES ENT ON ENT.ID_ENTITY = CMPL.ID_ENTITY
>ORDER BY CMPL.COMPLAIN_DATE, COMP.PREFIX, COMP.GROUP_SKIP, COMP.UNIT,
> ANAG.PREFIX, ANAG.UNIT
>
>The EditSQL property of the same query is this:
>
>EXECUTE PROCEDURE UPDATE_TEMP_COMPLAINS(
> :ID_TEMP_COMPLAIN, :REJECTED, :REJECTION_REASON, :CHECKED)
>
>The SP code is this:
>
>CREATE PROCEDURE UPDATE_TEMP_COMPLAINS(
>TEMP_ID INTEGER, IS_REJECTED INTEGER, REASON VARCHAR(50),
>IS_CHECKED INTEGER)
>AS
>BEGIN
> UPDATE TEMP_COMPLAINS
> SET REJECTED = :IS_REJECTED,
> REJECTION_REASON = :REASON,
> CHECKED = :IS_CHECKED
> WHERE ID_TEMP_COMPLAIN = :TEMP_ID;
>END ^
>
>All of this works fine and I can update the three fields, but I detect
>the erratic behaviour of the UpdateBar. The Update button is always
>enabled, even when it should not, that's to say when I have already
>clicked it and I am already in edit mode.
>
>I hope that now all is clear.

Yes, it's clear. Now, to look for a reason.
Do you have KeyLinks set? If so, what are they? I guess it is possible
that, with incomplete or missing KeyLinks, the dataset can't tell which row
it is editing. It's possible you are updating more than one row when you
post your edit.

Helen


>Regards
>Salvatore
>
>
>
>
>___________________________________________________________________________
>IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
>___________________________________________________________________________
>http://www.ibobjects.com - your IBO community resource for Tech Info papers,
>keyword-searchable FAQ, community code contributions and more !
>Yahoo! Groups Links
>
>
>
>