Article

From:
To:
All
Subject:
TwwDBLookupCombo trouble
Newsgroup:
woll2woll.products.infopower

TwwDBLookupCombo trouble

I am using a TwwDBLookupCombo component (wwDBLookupCombo1) with 
the lookuptable property linked to a TwwTable (wwTable1) and the 
datasource property linked to a TwwDataSource (aircraftsource) which 
is in turn linked to a TwwTable on another form (datamodule1.aircraft).  

like so:
wwDBLookupCombo1
|                \
|(lookuptable)    \ (datasource)
|                  \ wwTable1           aircraftsource
|                    |
|(tablename)         |(dataset)
|                    |
gaexcept.dbf       datamodule1.aircraft
                     |
                     |(tablename)
                     |
                   aircraft.dbf

When a record is selected from wwDBLookupCombo1 and the user saves the change, a record is removed from gaexcept.dbf. If the user performs another operation elsewhere in the program, this record is restored to gaexcept.dbf . My problem is that after this remove/restore occurs, the record no longer appears on the dropdown. The first field on the record is modified by this sequence of events, but this field is not a part of any index.
There is no filtering, there is no SQL, there is no other reason I can fathom for this record not appearing on the dropdown. The removed/restored record is in the table, all index field values for this record are identical in the "after" version and the "before" version of the table.
What are the possible causes of a record in the lookup table not appearing in the result set?
Thanks!
Charlie Hitselberger ✉faa.gov
Here is the "view as text" version of the form containing the components:
object aircraftform: Taircraftform   Left = 256   Top = 201   Width = 275   Height = 220   Caption = 'Aircraft'   Color = clBtnFace   Font.Charset = DEFAULT_CHARSET   Font.Color = clBlack   Font.Height = -11   Font.Name = 'MS Sans Serif'   Font.Style = []   OldCreateOrder = True   Position = poScreenCenter   OnCloseQuery = FormCloseQuery   OnShow = FormShow   PixelsPerInch = 96   TextHeight = 13   object Panel2: TPanel     Left = 113     Top = 0     Width = 154     Height = 191     Align = alClient     BevelInner = bvLowered     BorderWidth = 4     Caption = 'Panel2'     TabOrder = 0     object DBGrid1: TwwDBGrid       Left = 6       Top = 6       Width = 142       Height = 179       Selected.Strings = (         'FLIGHT_NO'#9'12'#9'TAIL NO'         'STATUS'#9'1'#9'STATUS')       MemoAttributes = [mSizeable, mWordWrap, mGridShow]       TitleColor = clBtnFace       FixedCols = 0       ShowHorzScrollBar = True       Align = alClient       BorderStyle = bsNone       DataSource = aircraftSource       Enabled = False       KeyOptions = [dgAllowInsert]       Options = [dgEditing, dgAlwaysShowEditor, dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]       TabOrder = 0       TitleAlignment = taLeftJustify       TitleFont.Charset = DEFAULT_CHARSET       TitleFont.Color = clBlack       TitleFont.Height = -11       TitleFont.Name = 'MS Sans Serif'       TitleFont.Style = []       TitleLines = 1       TitleButtons = False       IndicatorColor = icBlack     end   end   object Panel1: TPanel     Left = 0     Top = 0     Width = 113     Height = 191     Align = alLeft     BevelInner = bvRaised     BevelOuter = bvLowered     TabOrder = 1     object DBText1: TDBText       Left = 16       Top = 16       Width = 65       Height = 17       DataField = 'ACCOUNT'       DataSource = aircraftSource     end     object OKBtn: TBitBtn       Left = 16       Top = 82       Width = 81       Height = 27       Caption = '&Save'       TabOrder = 0       OnClick = OKBtnClick       Kind = bkOK       Margin = 2       Spacing = -1       IsControl = True     end     object CancelBtn: TBitBtn       Left = 16       Top = 118       Width = 81       Height = 27       Caption = '&Cancel'       TabOrder = 1       OnClick = CancelBtnClick       Kind = bkCancel       Margin = 2       Spacing = -1       IsControl = True     end     object wwDBLookupCombo1: TwwDBLookupCombo       Left = 16       Top = 40       Width = 81       Height = 21       DropDownAlignment = taLeftJustify       Selected.Strings = (         'FLIGHT_NO'#9'10'#9'FLIGHT_NO'         'DATE'#9'10'#9'DATE'         'ARR_CITY'#9'20'#9'ARR_CITY'         'DEP_CITY'#9'20'#9'DEP_CITY')       DataField = 'FLIGHT_NO'       DataSource = aircraftSource       LookupTable = wwTable1       LookupField = 'FLIGHT_NO'       TabOrder = 2       AutoDropDown = False       ShowButton = True       SeqSearchOptions = [ssoEnabled, ssoCaseSensitive]       AllowClearKey = False     end   end   object wwTable1: TwwTable     DatabaseName = 'Database'     IndexName = 'UNIQFLIGHT'     TableName = 'gaexcept.DBF'     SyncSQLByRange = True     NarrowSearch = False     ValidateWithMask = True     Left = 200     Top = 136   end   object aircraftSource: TwwDataSource     DataSet = Datamodule1.aircraft     Left = 199     Top = 101   end end
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Thu, 16 May 2024 20:16:33 UTC
Copyright © 2009-2024
HREF Tools Corp.