Subject Re: in new API
Author Norbert Saint Georges
Norbert Saint Georges nsg@... [firebird-support] a écrit :
>> transaction id (= current_transaction)
>
> /* jrd\inf_pub.h

ok, we erase everything and we take the sources of UIB.
var
item : ansichar;

data: packed record
item: AnsiChar;
len: word;
case byte of
0: (vByte: Byte);
1: (vSmallint: Smallint);
2: (vInteger: Integer);
3: (dummy: array[0..5] of byte);
end;
fresult : integer;
begin

item :=ansichar(4);

tra.getInfo(st,1,@item,sizeof(data),@data);

if (data.item = item) then
case data.len of
0: ;
1: fresult := data.vByte;
2: fresult := data.vSmallint;
4: fresult := data.vInteger;
else
raise exception.Create('Unexpected data size.');
end else
raise exception.Create('Invalid item identifier.');
works very well.

--
Norbert Saint Georges
http://tetrasys.fi