Recent

Author Topic: Size of String fields with ZEOS  (Read 3367 times)

Mando

  • Full Member
  • ***
  • Posts: 181
Size of String fields with ZEOS
« on: February 21, 2011, 07:03:26 pm »
Hi.

I want to set maxLenght of the DBEdit in a form. I used Zeos with a firebird UTF8 database.
When I get the size of the field, the result is 4*actual size of the field.

I defined a char field with length 6, but field.size returns 24. I must divide by 4 to get the actual size of the field.

Why this behaivor?  Is it because database uses UTF8?



regards.

Lacak2

  • Guest
Re: Size of String fields with ZEOS
« Reply #1 on: February 22, 2011, 06:24:16 am »
I think, that answer is yes.
But this is not good IMO.
Size should be equal to your SQL column definition = "character length"
DataSize should be "byte length"
« Last Edit: February 22, 2011, 06:26:20 am by Lacak2 »

 

TinyPortal © 2005-2018