Subject Re: [IBO] How to store a SET into Firebird with IBO?
Author Ramil
Hello
Try 8 Integer fields (or 4 Int64 as you wish)

type
PByteSet = ^TByteSet;
TByteSet = set of Byte;

var
INT8: Array[1..8] of Integer;
MySet,MySet2: TByteSet;

...
//write
PByteSet(@INT8)^:=MySet;
IB_Query1.FieldByName('SET1').AsInteger:=INT8[1];
IB_Query1.FieldByName('SET2').AsInteger:=INT8[2];
...
IB_Query1.FieldByName('SET8').AsInteger:=INT8[8];

...
//read
INT8[1]:=IB_Query1.FieldByName('SET1').AsInteger;
INT8[2]:=IB_Query1.FieldByName('SET2').AsInteger;
...
INT8[8]:=IB_Query1.FieldByName('SET8').AsInteger;
MySet2:=PByteSet(@INT8)^;

Ramil

> I have three differents SETs in my Delphi application, I'd like to store
> in a Firebird Table

> 1.) What datatype is appropriate to store it?
> 2.) What do you recommend for converting the SET into the Firebird
> compatible datatype?

> Regards
> Gunther