Icon View Incident Report

Serious Serious
Reported By: Francisco Fernandez
Reported On: 7/15/2008
For: Version 2.01 Build 1
# 2704 Changing the Active Index with an Active OnFilterRecord Event Handler Can Cause Access Violation

I have an unit to find records that use the index if exist. Curiously i have a table with an index that if the length of the field is between 18 and 25 it gives me the error "Access violation" when i try to use this index.

In the example that i send you if you type some character in the fields "CODIGO" or "DESCRIPCION" the unit select the index asociated and find the first record than have the character typed correctly. If you type in the field "ARTICULO" will do an error. If you change the length of the field "ARTICULO" to 30 for example it not give error.


Comments Comments and Workarounds
The workaround is to set the OnFilterRecord event to nil before switching the index, and then setting it back to the desired value after switching the index:

with MyTable do
begin
OnFilterRecord:=nil;
IndexName:='MyIndex';
OnFilterRecord:=MyFilterRecordEventHandler;
end;


Resolution Resolution
Fixed Problem on 7/16/2008 in version 2.01 build 2


Products Affected Products Affected
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image