Recent

Author Topic: Problem with dbf (TDbf)  (Read 6105 times)

zeljko

  • Hero Member
  • *****
  • Posts: 1095
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Problem with dbf (TDbf)
« on: January 10, 2010, 01:30:00 pm »
I'm using TDbf for special purposes (I have to ! for at least another 1 yr), but went into weird problem.Problem is with ftString field. Under linux everything is fine, but under win32 all ftString fields are cutted to 20 chars.
fpc-2.4.1, lazarus r 23416.
Anyone have such problem ?

cdbc

  • Full Member
  • ***
  • Posts: 236
    • http://www.cdbc.dk
Re: Problem with dbf (TDbf)
« Reply #1 on: January 10, 2010, 07:13:07 pm »
hi

UTF-8 issues?!?

Regards Benny
If it ain't broke, don't fix it ;)

zeljko

  • Hero Member
  • *****
  • Posts: 1095
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Problem with dbf (TDbf)
« Reply #2 on: January 11, 2010, 08:59:43 am »
Why UTF-8 issue ? I'm passing non UTF-8 string to dbf, and converting to UTF-8 while retrieving it.
Under linux everything is fine, just windows makes problem.

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Problem with dbf (TDbf)
« Reply #3 on: January 11, 2010, 12:36:29 pm »
And what is the length of ftString's field.

zeljko

  • Hero Member
  • *****
  • Posts: 1095
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Problem with dbf (TDbf)
« Reply #4 on: January 11, 2010, 12:41:56 pm »
first time was 20, later I've tried with 0 and 255 but result is same.

clauslack

  • Sr. Member
  • ****
  • Posts: 275
Re: Problem with dbf (TDbf)
« Reply #5 on: January 11, 2010, 01:45:09 pm »
If you can reproduce this in litle project (with the dbf file), Maybe I can help you, I have a system (in production) that export-import data from Dbf<->Firebird and work fine.

Upload the project (without the lrs) - 4 kb compressed.

Regards

zeljko

  • Hero Member
  • *****
  • Posts: 1095
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Problem with dbf (TDbf)
« Reply #6 on: January 13, 2010, 08:32:13 pm »
I've fixed it by using ftWideString instead of ftString, now it works ok. Tnx for help.