Size of strings again
Posted: 16.06.2017, 20:21
Hello,
first I read this:
http://zeoslib.sourceforge.net/viewtopic.php?t=3595
I think TField.Size can be used for character length. TField.DataSize can be used for needed bytes to save.
Here is informations from emba and fpc.
http://docs.embarcadero.com/products/ra ... _Size.html http://docs.embarcadero.com/products/ra ... aSize.html
https://www.freepascal.org/docs-html/fc ... asize.html
I am using FirebirdSQL. For FireBird you can get fieldsize and charakterlength with this commands:
For one Varchar(20) field you get:
c.RDB$FIELD_LENGTH = 80
c.RDB$CHARACTER_LENGTH =20
And the:
TZQSQL.Field.Datasize=81
TZQSQL.Field.Size=80
I think TZQSQL.Field.Size sould be 20. I want to change this for my Zeos.
Now my Question is, when I change TField.Size to real character length will this cause other problems or side effects?
and In which units of zeos-comments have to change it? There is too many units I searched for ".size" found something else.
first I read this:
http://zeoslib.sourceforge.net/viewtopic.php?t=3595
I think TField.Size can be used for character length. TField.DataSize can be used for needed bytes to save.
Here is informations from emba and fpc.
http://docs.embarcadero.com/products/ra ... _Size.html http://docs.embarcadero.com/products/ra ... aSize.html
https://www.freepascal.org/docs-html/fc ... asize.html
I am using FirebirdSQL. For FireBird you can get fieldsize and charakterlength with this commands:
Code: Select all
SELECT b.RDB$RELATION_NAME, b.RDB$FIELD_NAME, c.RDB$FIELD_LENGTH, c.RDB$CHARACTER_LENGTH FROM RDB$RELATION_FIELDS b
INNER JOIN RDB$FIELDS c ON c.RDB$FIELD_NAME = b.RDB$FIELD_SOURCE
WHERE b.RDB$SYSTEM_FLAG = 0
ORDER BY b.RDB$RELATION_NAME, b.RDB$FIELD_POSITION
c.RDB$FIELD_LENGTH = 80
c.RDB$CHARACTER_LENGTH =20
And the:
TZQSQL.Field.Datasize=81
TZQSQL.Field.Size=80
I think TZQSQL.Field.Size sould be 20. I want to change this for my Zeos.
Now my Question is, when I change TField.Size to real character length will this cause other problems or side effects?
and In which units of zeos-comments have to change it? There is too many units I searched for ".size" found something else.