[fpc-devel] How to add integer in TDataSet.GetFieldData?
Michael Van Canneyt
michael at freepascal.org
Thu Oct 9 08:53:53 CEST 2008
On Wed, 8 Oct 2008, Dusan Halicky wrote:
> Hi
>
> I'm creating dataset derived from TDataSet. I have a problem with
> adding integers in TDataSet.GetFieldData method. For now, I can only
> add strings this way:
>
> if Buffer <> nil then
> begin
> StrLCopy(Buffer, 'Hello World', 11);
> result := true;
> end;
>
> But I need to add Integer. And boolean. Thanks.
if Buffer <> nil then
begin
PInteger(Buffer)^:=MyInteger;
result := true;
end;
Same for boolean.
Michael.
More information about the fpc-devel
mailing list