Subject Re: [IBO] InvalidateRows
Author Gerard J.M.Houtenbos
Jason,

Here is my little sample-app. I didn't mention one thing:
The changed value of FIELD2 is not reflected in the grid, ONLY
when there is at least one column in between FIELD1 and FIELD2.
So there must be a grid with three columns.

I hope you can figure this out.
The database TEST.GDB is pointed at via an alias in ALIASES.CONF
named 'InvalidateRows'.

Gerard

On Fri, 11 Jul 2003 21:55:52 -0700, you wrote:

>I'd like for you to please construct a sample application with easy steps to
>reproduce this problem.
>Send it to me privately and I will take a look at it. Please make the app as
>simple as possible.
>
>Thanks,
>Jason Wharton
>
>----- Original Message -----
>From: "Gerard J.M.Houtenbos" <gh@...>
>To: <IBObjects@yahoogroups.com>
>Sent: Friday, July 11, 2003 5:05 AM
>Subject: Re: [IBO] InvalidateRows
>
>
>> I'll try to be more specific:
>>
>> I have a two column TwwDbGrid and a two column TIBOQuery
>> (qryTest) with two float-fields.
>> The OnChange-event-handler of Field1 consists of:
>> {==================}
>> qryTest.FieldByName('FIELD2').AsFloat := 2 *
>> qryTest.FieldByName('FIELD1').AsFloat;
>> qryTest.InvalidateRows;
>> {==================}
>>
>> So the value of Field2 is filled with the value of Field1
>> multiplied by 2.
>>
>> Back to the grid. If I change the value of the column Field1, and
>> tap the Tab-key, then the value of column Field2 shows the
>> correct value, so the OnChange-event-handler works fine. However,
>> the record isn't posted yet. If I then change the value of the
>> column Field1again an EAccessViolation shows up with the text:
>> Access violation at address 0057497C in module 'Infas.exe'. Read
>> of address 0000000C.
>>
>> If I change the value of Field1 and then POST the record, all
>> works fine and I can change the value of Field1 again without any
>> exceptions.
>>
>> tia,
>>
>> Gerard
>>
>>
>> On Thu, 10 Jul 2003 13:07:00 -0700, you wrote:
>>
>> >> I use a TwwDbGrid and a TIBOQuery.
>> >> In the OnChange-event of Field1 I change the value of Field2 that
>> >> is depending on Field1.
>> >> The change of Field2 is not visible in the grid.
>> >> So I use a call to InvalidateRows in the OnChange-event. Then the
>> >> change of Field2 is instantly visible in the grid.
>> >> But when I change Field1 a second time, without posting it first,
>> >> an exception is raized.
>> >> How do I solve this?
>> >
>> >You eed to be more clear here.
>> >
>> >At the very least let us know what exception was raised.
>> >
>> >Also, I can't really tell what it is you are doing.
>> >
>> >Jason
>
>
>
>___________________________________________________________________________
>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 !
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>

_________________________

Gerard J.M. Houtenbos
DoubleWood Software


[Non-text portions of this message have been removed]