Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-10

How to add integer in TDataSet.GetFieldData?

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dusan Halicky

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.

Reply by email

Michael Van Canneyt
to Dusan Halicky
Dusan Halicky wrote 13 lines
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.

Reply by email