Subject | Re: [IBO] Invalid internal cursor key handling error |
---|---|
Author | Geoff Worboys |
Post date | 2015-12-22T07:58:05Z |
Hi Marcin,
I am still around, just don't have much to say lately. :-)
IBO will still need a key-link definition. Since your query
does not include a key you will have to set KeyLinksAutoDefine
to false and specify TRANSPORT ... but since TRANSPORT is not
unique (assumed from your DISTINCT clause) it's possible that
may cause issues, not sure if I've ever tried it, so I don't
know how IBO handles DISTINCT with a lookup.
Using AutoFetchAll on the lookup dataset may resolve it if
there is a problem (if the dataset is small enough for this to
be okay), because all the rows will be there and there should
be no need to try and lookup a value from the database by key.
(This seemed to work for me when I was using a series of UNION
selects for a small lookup.)
One thing I have sometimes reverted to in odd situations like
this is to create a view for the lookup to use.
I'm running quite a few updates behind with IBO, and you didn't
mention what version you're using.
Merry Christmas to you too.
--
Geoff Worboys
Telesis Computing Pty Ltd
'Marcin Bury' marcin.bury@... [IBObjects] wrote:
I am still around, just don't have much to say lately. :-)
IBO will still need a key-link definition. Since your query
does not include a key you will have to set KeyLinksAutoDefine
to false and specify TRANSPORT ... but since TRANSPORT is not
unique (assumed from your DISTINCT clause) it's possible that
may cause issues, not sure if I've ever tried it, so I don't
know how IBO handles DISTINCT with a lookup.
Using AutoFetchAll on the lookup dataset may resolve it if
there is a problem (if the dataset is small enough for this to
be okay), because all the rows will be there and there should
be no need to try and lookup a value from the database by key.
(This seemed to work for me when I was using a series of UNION
selects for a small lookup.)
One thing I have sometimes reverted to in odd situations like
this is to create a view for the lookup to use.
I'm running quite a few updates behind with IBO, and you didn't
mention what version you're using.
Merry Christmas to you too.
--
Geoff Worboys
Telesis Computing Pty Ltd
'Marcin Bury' marcin.bury@... [IBObjects] wrote:
> Hi All
> I have a Geoff's IB_lookupEnh with following query:
> SELECT DISTINCT TRANSPORT FROM MGP_PZ
> as lookup dataset.
> TRANSPORT is simple varchar field and is not a key field for table
> MGP_PZ
> When I try to search a value via typing I'm getting this error.
> Can someone tell where to start looking for the reason of that?
> Here is the call stack:
> [0068A37F] IB_Components.TIB_BDataset.AfterFetchCursorRow
> [0068A13F] IB_Components.TIB_BDataset.InternalCursorAfterFetchRow
> [0067EC1A] IB_Components.TIB_Dataset.SysAfterFetchCursorRow (Line 31026,
> ''IB_Components.pas'')
> [0067EA63] IB_Components.TIB_Dataset.SysFetchNext (Line 30965,
> ''IB_Components.pas'')
> [006838FD] IB_Components.TIB_Dataset.SysCursorMoveByRow
> [00690032] IB_Components.TIB_BDataset.NeedRecords
> [0068F270] IB_Components.TIB_BDataset.CheckRowNum
> [0068F530] IB_Components.TIB_BDataset.SetBufferRowNum
> [00690AF0] IB_Components.TIB_BDataset.ValidateRows
> [00A424C6] IB_Grid.TIB_CustomGrid.UpdateRowCount (Line 4095,
> ''IB_Grid.pas'')
> [00A41932] IB_Grid.TIB_CustomGrid.SysStateChanged (Line 3743,
> ''IB_Grid.pas'')
> [00A4AB16] IB_Grid.TIB_CustomGrid.ProcessStatementEvent (Line 8196,
> ''IB_Grid.pas'')
> [00A3EFCE] IB_Grid.TIB_CustomGridLink.ProcessGridEvent (Line 2313,
> ''IB_Grid.pas'')
> [0069CC80] IB_Components.TIB_DataLink.ProcessStatementEvent
> [0069B816] IB_Components.TIB_DataLink.SetDataSource
> [00A4024F] IB_Grid.TIB_CustomGrid.SetDataSource (Line 44,
> ''IB_Control.imp'')
> [00A71E23]
> Telesis_IB_LookupEnh.TIB_ComboLookupListEnh.SyncToParentValue
> (Line 1183, ''Telesis_IB_LookupEnh.pas'')
> [00A6D12D] Telesis_ComboEnh.TCustomComboControlEnh.DropDown (Line 936,
> ''Telesis_ComboEnh.pas'')
> [00A6D51B] Telesis_ComboEnh.TCustomComboEnh.ShowDropDown (Line 1090,
> ''Telesis_ComboEnh.pas'')
> [00A6DAC8] Telesis_ComboEnh.TCustomComboEnh.DoButton1 (Line 1353,
> ''Telesis_ComboEnh.pas'')
> [00A5FA78] Telesis_EditEnh.TEditEnhButtonEnh.DoButtonDown (Line 1193,
> ''Telesis_EditEnh.pas'')
> [00A54484] Telesis_Types.TControlButtonEnh.DoSetState (Line 1658,
> ''Telesis_Types.pas'')
> [00A544C5] Telesis_Types.TControlButtonEnh.KeyDown (Line 1672,
> ''Telesis_Types.pas'')
> [00A6055E] Telesis_EditEnh.TCustomEditEnh.KeyDown (Line 1578,
> ''Telesis_EditEnh.pas'')
> [00A6D898] Telesis_ComboEnh.TCustomComboEnh.KeyDown (Line 1249,
> ''Telesis_ComboEnh.pas'')
> [00A74AE3] Telesis_IB_LookupEnh.TIB_CustomLookupEnh.KeyDown (Line 2444,
> ''Telesis_IB_LookupEnh.pas'')
> [0053D647] Controls.TWinControl.DoKeyDown
> Thanks in advance
> Merry Christmas
> Marcin
> ------------------------------------
> Posted by: "Marcin Bury" <marcin.bury@...>
> ------------------------------------
> ___________________________________________________________________________
> 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 !
> http://tracker.ibobjects.com - your portal to submit and monitor bug reports
> http://community.ibobjects.com - your portal to purchase and upgrade
> ------------------------------------
> Yahoo Groups Links