Problems with postgres SQL text type field and StringetTypes generated

Postgres field type text is generated as IROString , read only fields by stronged typed generator.

Sample:

property address_building: IROStrings read Getaddress_buildingValue;

vs standard fro varchars fields

property bitacoraid: String read GetbitacoraidValue write SetbitacoraidValue;

Thanks for fix that.

Best regards.

from PostgreSQL: Documentation: 9.1: Character Types :

Name Description
character varying(n), varchar(n) variable-length with limit
character(n), char(n) fixed-length, blank padded
text variable unlimited length

as a result, text field is treated as Memo/WideMemo as it has IROStrings type

Why is not writable using stronged type?

it is writable. we use OnChange event on related TStringList for applying changes back to field.


can you cerate a simple testcase, that demonstrates this problem, pls?
you can attach it here or send to support@

Evgeny,
I think we are not talking about the same .
The field IS editable with fiedlbyname(nameoffield) as string, but is not accesing as interface like

var
aBitacora : TDAMemDataTable;

  (aBitacora as Ibitacora_entidad).address_building := 'Something';

error

[dcc32 Error] Main.pas(447): E2129 Cannot assign to a read-only property

beacuse stringed typed generator dnt create the write property, only the read property:

property address_building: IROStrings read Getaddress_buildingValue;

is clear now?

why you can’t use something like

(aBitacora as Ibitacora_entidad).address_building.Text := 'Something';

?

I dont know i must use a different method that the used with other (string properties). Now i know.

A lot better will be if the generator use standard methods, as the other fields, direct acces, dont you think?

That works

  (aBitacora as Ibitacora_entidad).bitacoraid := '100';
  (aBitacora as Ibitacora_entidad).address_building.Text := '100';

That is easier (and more instinctive) dont work

  (aBitacora as Ibitacora_entidad).bitacoraid := '100';
  (aBitacora as Ibitacora_entidad).address_building := '100';

IROStrings interface has Strings property so you have more possibilities for communicating with Memo field, like loading of content from file:

(aBitacora as Ibitacora_entidad).address_building.Strings.LoadFromFile(myfile);

with string type, this is impossible.

Ok then, is a valid reason.

Best regards.