Subject TInc_Search problem
Author Daniel Rail
Hi,

I'm having a problem with TInc_Search. Everything works fine except in
certain circumstances. Here's an example: If I enter the letter "f" and
no records starts with that letter I get the following error:

---------------------------11:15:08 25/03/2002---------------------------
Exception 'EIB_StatementError' in module Filopto41.exe at 00242841
FieldName: LASTNAME not found

Source file: IBA_BDataset.IMP, Line 39646

Call stack:
:40243841 [Filopto41.exe] Ib_components.TIB_Row.ByName (IBA_BDataset.IMP,
line 39646)
:40237796 [Filopto41.exe] Ib_components.TIB_BDataset.NeedRecords
(IBA_BDataset.IMP, line 33965)
:40236C46 [Filopto41.exe] Ib_components.TIB_BDataset.CheckRowNum
(IBA_BDataset.IMP, line 33636)
:40236EC8 [Filopto41.exe] Ib_components.TIB_BDataset.SetBufferRowNum
(IBA_BDataset.IMP, line 33702)
:402388DA [Filopto41.exe] Ib_components.TIB_BDataset.ValidateRows
(IBA_BDataset.IMP, line 34541)
:40363336 [Filopto41.exe] Ib_grid.TIB_CustomGrid.UpdateRowCount
(IB_Grid.pas, line 3381)
:403627E0 [Filopto41.exe] Ib_grid.TIB_CustomGrid.SysStateChanged
(IB_Grid.pas, line 3072)
:4022C54C [Filopto41.exe] Ib_components.TIB_Dataset.DoLinkStateChanged
(IBA_Dataset.IMP, line 3482)
:4023A440 [Filopto41.exe] Ib_components.TIB_BDataset.IncSearchKey
(IBA_BDataset.IMP, line 35197)
:403BC805 [Filopto41.exe] Ib_incsearch.TIB_IncSearch.KeyPress
(IB_IncSearch.pas, line 507)
:4003ED83 [Filopto41.exe] Controls.TWinControl.DoKeyPress
:4003D487 [Filopto41.exe] Controls.TWinControl.MainWndProc

Here's the select statement:
SELECT CLIENTNO
, LASTNAME
, FIRSTNAME
, MIDDLENAME
, CITY
, PROVINCE
, COUNTRY
, POSTALCODE
, MAIDENNAME_ALIAS
, PHONEHOME
, BIRTHDATE
, SSN
, MEDICARE_
, PHONEOFFICE
, CLIENTSTATUS
FROM CLIENTS

I tried with SearchKeyByKey:=True and False. I tried SeekNearest:=True and
False. And I also tried AllowTimeOut:=True and False. And, any combination
of them.

Is there something that I'm missing or forgetting to do? I don't get the
error in design time in IBO's query editor.

Thanks in advance.


Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)