Subject Re: [Firebird-Architect] Enumerated Types
Author Martijn Tonies
Hi,

> > I keep coming up against the problem of interpreting Delphi
> > enumerated types into database field values and back again. Soon I
> > will have to translate my app into different languages, and the
> > problem will increase as this happens. So I am asking whether a new
> > datatype might be possible - called say "Enumerated".
> >
> > Here is a sample scenario.
> >
> > In Delphi I define
> >
> > TOrderStatus = (osQuotation,osOrder,osDelivered,osInvoiced);
> > TOrderStatuses = array[TOrderStatus] of string;

Or store:

Ord(myorderstatusvar)

And use:

var
ostatus: TOrderStatus;

ostatus := TOrderStatus(mydataset.FieldByName('mystatus').AsInteger);