[fpc-devel] TSdfDataset does not work with records larger then 255 chars

Inoussa OUEDRAOGO inoussa12 at gmail.com
Mon Sep 8 14:40:44 CEST 2008


> Another wierd thing is that it absolutely does not work (nothing is
> read from database) if I don't set MaxRecordLength. The property has a
> default value of 250, which somehow does not work, so I removed the
> default in the property and initialized the value in the constructor,
> which works.

Just for clarification : if you declare a property with a default
value, you _have_ to set
that value to the property in the constructor. The compiler will _not_
set it for you.
For example :

TClass_a = class
public
  property a : integer read Fa write Fa default 1210;
  constructor Create();
end;

constructor TClass_a.Create();
begin
  Fa := 1210;
end;

-- 
Inoussa O.



More information about the fpc-devel mailing list