Subject | Re: [Firebird-Architect] Enumerated Types |
---|---|
Author | Martijn Tonies |
Post date | 2003-07-15T10:42:28Z |
Hi,
Ord(myorderstatusvar)
And use:
var
ostatus: TOrderStatus;
ostatus := TOrderStatus(mydataset.FieldByName('mystatus').AsInteger);
> > I keep coming up against the problem of interpreting DelphiOr store:
> > 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;
Ord(myorderstatusvar)
And use:
var
ostatus: TOrderStatus;
ostatus := TOrderStatus(mydataset.FieldByName('mystatus').AsInteger);