Recent

Author Topic: Field size problem with linux and firebird  (Read 684 times)

cappe

  • Full Member
  • ***
  • Posts: 191
Field size problem with linux and firebird
« on: June 17, 2020, 11:45:18 am »
I use lazarus 1.8.0 for linux x64 and zeos 7.2.6 and firebird 2.5. The database has WIN1252 as a code page.

ZConnection is set:
ClientCodePAge WIN1252
ControlsCodePage cCP_UTF8

ZQuery.SQL is "select * from home"

I click twice on ZQUERY and add the static fields.

The problem is that the size is wrong. For example
The "ID" field
In the DB it is varchar (10)
in lazarus it assigns me size = 40. This creates problems when I insert long strings generating exception in the database. :'( :'(

How can I solve it?
« Last Edit: June 17, 2020, 12:01:06 pm by cappe »

mangakissa

  • Hero Member
  • *****
  • Posts: 1131
Re: Field size problem with linux and firebird
« Reply #1 on: June 18, 2020, 08:28:23 am »
You can't. It's a conversion problem. I have the same with UTF-8. I Manually override it to actual size.
Lazarus 2.06 (64b) / FPC 3.0.4 / Windows 10
stucked on Delphi 10.3.1

 

TinyPortal © 2005-2018