Icon View Incident Report

Serious Serious
Reported By: Burak Kiper
Reported On: 11/6/1998
For: Version 1.07 Build 1
# 236 Locate On a String Field Causes an Access Violation

I have a very big problem. Since Almost three days, I tried to find the problem and I think found it. But still not sure. Here is a simple code:

if dm1.T_temp.Locate('Grupname',a.name,[loCaseInsensitive]) then
//sorun bu satýrda
dm1.T_Temp.Delete;

that tries to locate a string in T_temp which is a memory table (I also tried it as a normal table).
The field Grupname is a string with length 100 characters. My problem is simple. I put this line in a for loop which counts upto 25,414. but this line gives me AV in some point. But count always different. Sometimes it can be 10th loop sometimes 1,800th but never reach and past count 2000. After trial and error, I decided to move my problem to a prototype project and do the same thing also with BDE. And I also got an error. But this time error was a Database error (Errcat_invalidcontext, dbierr_NA) and also bde gave the error always at the same point. After several tries, I understood that if you try to locate a string
which is more than 100 characters long, bde gives this error. And putting an if statement that checks this condition prevented this error. And now I am ok with bde. The problem solved. And I did the same thing and put the same if statement into the dbisam testing part. But nothing changed. The problem still continues.


Comments Comments
Problem was with trying to use a filter on a string field where the constant being compared was much smaller than the actual string field size being compared. This has been fixed.


Resolution Resolution
Fixed Problem on 11/9/1998 in version 1.08 build 1
Image