Subject Restoring a LookupCombo box value
Author Paul Schmidt
Dear List:

I would like to do something interesting, but I am not sure about a
couple of things, this is partly a Delphi problem and partly an IBO
problem.

I have a program that records a time, and needs to also obtain a
value from a table, this will then get stored in a flat file. Later
on we again record the time, and need to create a record like the
following:

CREATE TABLE TIMECARD
(
TIMECARD_ID INTEGER NOT NULL,
PHASE_ID INTEGER DEFAULT 0 NOT NULL,
START_DATE_TIME DATE,
END_DATE_TIME DATE,
HOURS DOUBLE PRECISION DEFAULT 0.0 NOT NULL,
DAYS DOUBLE PRECISION DEFAULT 0.0 NOT NULL,
CONSTRAINT PK_TIMECARD PRIMARY KEY (TIMECARD_ID)
);

PHASE_ID is looked up from another table
START_DATE_TIME is from the flat file
END_DATE_TIME is the second recorded date and time (yes these are
both dialect 1)

HOURS are the difference expressed in hours, so 1:45 is 1.75.
DAYS are the number of hours divided by 7.5 or 8, I store these
because they are used in reports, and it's a lot easier to store
them, then it is to do the same computation over and over ad nausium.

I will make an assumption here that I can add a new record using
TIB_Query, and filling in the values I want a la TTable. Is this a
safe assumption?

Now, I would like to be able to store PHASE_ID in the flat file, and
then when we restart the program and read this value into the
TIB_LookupCombo so that it shows the value, sort of as a persistant
object. Is this doable, or should I use TIBO_Query, or worse do I
need to troll the table, I only look at about 30 active records at
any one time, so I don't mind.

Paul













Paul Schmidt,
Tricat Technologies
Email: paul@...
Website: www.tricattechnologies.com