* * *

Author Topic: [Closed] DBF + MDX error  (Read 423 times)

sstvmaster

  • New member
  • *
  • Posts: 8
[Closed] DBF + MDX error
« on: May 12, 2018, 01:29:16 pm »
Hi,

i want to read a DBF file. Without mdx it reads the DBF. With mdx i get the error:

Index based on unknown field "LEFT"

The DBF is from Fritz!Fax, the mdx is generated automatically by FritzFax.

The Test project: https://ufile.io/s0vbm

Please help.

Rgr Maik
« Last Edit: May 12, 2018, 05:39:27 pm by sstvmaster »
Lazarus 1.9.0 Trunk
Lazarus 1.8.2
Windows 7 32/64

bigeno

  • Full Member
  • ***
  • Posts: 210
Re: DBF + MDX error
« Reply #1 on: May 12, 2018, 04:05:04 pm »
Your index T_DATEI have expression UPPER(LEFT(DATEI,100))

According http://wiki.lazarus.freepascal.org/Lazarus_Tdbf_Tutorial#How_to_add_indexes_to_a_table tdbf 1.1 docs, LEFT is unsupported function. So maybe here is the problem.

sstvmaster

  • New member
  • *
  • Posts: 8
Re: DBF + MDX error
« Reply #2 on: May 12, 2018, 04:20:11 pm »
Hi,

thanks. And where i can add this function in which file?

In C:\fpcupdeluxe\fpcsrc\packages\fcl-db\src\dbase there are many files, where?


Lazarus 1.9.0 Trunk
Lazarus 1.8.2
Windows 7 32/64

bigeno

  • Full Member
  • ***
  • Posts: 210
Re: DBF + MDX error
« Reply #3 on: May 12, 2018, 05:09:53 pm »
Hi,

thanks. And where i can add this function in which file?

In C:\fpcupdeluxe\fpcsrc\packages\fcl-db\src\dbase there are many files, where?

Expression functions are defined in dbf_prscore.pas but idk if this is enough.

sstvmaster

  • New member
  • *
  • Posts: 8
Re: DBF + MDX error
« Reply #4 on: May 12, 2018, 05:38:31 pm »
Many thanks.

Thread closed!!
Lazarus 1.9.0 Trunk
Lazarus 1.8.2
Windows 7 32/64

sstvmaster

  • New member
  • *
  • Posts: 8
Re: [Closed] DBF + MDX error
« Reply #5 on: May 14, 2018, 09:45:54 pm »
Patch applyed to fpc rev 38990 (3.1.1)
Lazarus 1.9.0 Trunk
Lazarus 1.8.2
Windows 7 32/64

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus