Recent

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

sstvmaster

  • Sr. Member
  • ****
  • Posts: 299
[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 »
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

bigeno

  • Sr. Member
  • ****
  • Posts: 266
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

  • Sr. Member
  • ****
  • Posts: 299
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?


greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

bigeno

  • Sr. Member
  • ****
  • Posts: 266
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

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

Thread closed!!
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

sstvmaster

  • Sr. Member
  • ****
  • Posts: 299
Re: [Closed] DBF + MDX error
« Reply #5 on: May 14, 2018, 09:45:54 pm »
Patch applyed to fpc rev 38990 (3.1.1)
greetings Maik

Windows 10,
- Lazarus 2.2.6 (stable) + fpc 3.2.2 (stable)
- Lazarus 2.2.7 (fixes) + fpc 3.3.1 (main/trunk)

 

TinyPortal © 2005-2018