DBF direct access, date field problems

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rexiks
Posts: 1
Joined: Tue 12 Nov 2019 07:19

DBF direct access, date field problems

Post by rexiks » Tue 12 Nov 2019 11:45

Rad 10.3 unidac 8.0.1

Hi! if I`m trying to do something like this in unisql,

SELECT
PERIOD a , PERIOD +{date '0001-10-01'},PERIOD +2,
{fn TODATE(PERIOD)} ,
:ddd-:ddd,PERIOD-:ddd
from rg405
where {fn TODATE(PERIOD)}<>{date '2015-10-01'}
group by PERIOD

I get
a period+('0001-10-01') period+2 :ddd-:ddd PERIOD-:ddd
01.09.2015 2016 2017 01.09.2015 0 0
01.11.2015 2016 2017 01.11.2015 0 0

and when I try
SELECT
PERIOD a , PERIOD +{date '0001-10-01'},PERIOD +2,
{fn TODATE(PERIOD)} ,
:ddd-:ddd,PERIOD-:ddd
from rg405
where {fn TODATE(PERIOD)}={date '2015-10-01'}
group by PERIOD

I get nothing in sql result
but even period = 01.10.2015 records exists in dbf

Version: dBASE III, index present
Number of records: 111412
N Field name Type Width
1 PERIOD Date 8
2 SP4062 Character 9
3 SP408 Character 9
4 SP418 Character 9
5 SP3117 Numeric 16.2
6 SP411 Numeric 16.5
---------------------------------
Total: 68

it seems like field date has text format and comparison operations are not successful.
I did not find any functions or convertions, or field mapping to solve the problem. What should i do?

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: DBF direct access, date field problems

Post by Stellar » Thu 14 Nov 2019 15:02

Unfortunately, we can't reproduce the issue. To investigate this behavior of UniDAC, please compose a small sample demonstrating the issue and send it to us, including all database files (*.DBF, *.CDX, *.FPT, etc.).
You can send the sample using the contact form at our site: devart.com/company/contactform.html

Post Reply