Lazarus

Free Pascal => Database => Topic started by: sstvmaster on May 12, 2018, 01:29:16 pm

Title: [Closed] DBF + MDX error
Post by: sstvmaster 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 (http://ttps://ufile.io/s0vbm)

Please help.

Rgr Maik
Title: Re: DBF + MDX error
Post by: bigeno 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 (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.
Title: Re: DBF + MDX error
Post by: sstvmaster 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?


Title: Re: DBF + MDX error
Post by: bigeno 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.
Title: Re: DBF + MDX error
Post by: sstvmaster on May 12, 2018, 05:38:31 pm
Many thanks.

Thread closed!!
Title: Re: [Closed] DBF + MDX error
Post by: sstvmaster on May 14, 2018, 09:45:54 pm
Patch applyed to fpc rev 38990 (3.1.1)
TinyPortal © 2005-2018