Float Error

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
LHSoft
Posts: 104
Joined: Sat 18 Aug 2012 08:33

Float Error

Post by LHSoft » Wed 11 Jul 2018 07:50

since v336 Data.DB rises the error:

Code: Select all

function TField.GetAsFloat: Double;
begin
  raise AccessError('Float'); { Do not localize }
end;
Definition of the LiteTable:

Code: Select all

CREATE TABLE [KaVerCollect](
    [Idx] INTEGER PRIMARY KEY AUTOINCREMENT,
    [Position] INTEGER,
    [Barcode] NVARCHAR(13) NOT NULL ON CONFLICT FAIL,
    [BN] INTEGER,
    [Bezeichnung] NVARCHAR(40),
    [Artikelnummer] NVARCHAR(20),
    [Label] NVARCHAR(40),
    [Groesse] NVARCHAR(8),
    [Farbe] NVARCHAR(6),
    [Farbtext] NVARCHAR(50),
    [MWStKz] INTEGER,
    [MWStProzent] FLOAT(5, 2),
    [Kundennummer] INTEGER,
    [MengeKasse] INTEGER,
    [PreisVK] FLOAT(10, 2),
    [PreisBasis] FLOAT(10, 2),
    [PreisnachlassBetrag] FLOAT(10, 2),
    [Verkaufsrabatt] FLOAT(5, 2),
    [VerkaufsrabattBetrag] FLOAT(10, 2),
    [PreisKasseBasis] FLOAT(10, 2),
    [Kundenrabatt] FLOAT(5, 2),
    [KundenrabattBetrag] FLOAT(10, 2),
    [GesamtnachlassBetrag] FLOAT(10, 2),
    [PreisKasse] FLOAT(10, 2),
    [MWStBetrag] FLOAT(10, 2),
    [Kennzeichen] NVARCHAR(1));

CREATE UNIQUE INDEX [Id_KaVerCollect]
ON [KaVerCollect](
    [Position],
    [Idx]);
failed Operation:

Code: Select all

var
	RechnungsbetragOhneRundung: Currency;
	QVerCollect: TMSQuery;
begin
	QVerCollect.SQL.Clear;
	QVerCollect.SQL.Add('SELECT total(PreisKasse) as "SummePreisKasse" FROM KaVerCollect WHERE (Kennzeichen <> ''D'')');
	QVerCollect.Open;
	RechnungsbetragOhneRundung := QVerCollect.FieldByName('SummePreisKasse').AsCurrency;  <-- ERROR TField.GetAsFloat
end;
The last line raises the error since latest Version 3.3.6.

What is wrong?

MaximG
Devart Team
Posts: 1098
Joined: Mon 06 Jul 2015 11:34

Re: Float Error

Post by MaximG » Wed 11 Jul 2018 11:31

Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next LiteDAC build. Currently, we can send you a night build of LiteDAC with the fix. For this, please specify your license number and the exact version of Delphi you are using via the e-support form (https://www.devart.com/company/contactform.html)

LHSoft
Posts: 104
Joined: Sat 18 Aug 2012 08:33

Re: Float Error

Post by LHSoft » Wed 11 Jul 2018 12:22

Hello,
I can't use your support form propper fo this purpose because your spf records in your nameserver do not match your mailserver. I've sent you an email today with the log's extract to this error, so you ISP should know what to do.

I have transmitted my Licensenumber too, you should have got this request, but I do not get any answer cause of the misconfiguration of your Domain.

How can I get the fixed Setup?

LHSoft
Posts: 104
Joined: Sat 18 Aug 2012 08:33

Re: Float Error

Post by LHSoft » Wed 11 Jul 2018 12:33

I have found the reason of your Email Problems:
If using your support-form and activating "send me copy of request" you send me an email with my own email as Sender. This is not allowed because your mailserver is not authorized to send emails for my Domain. You MUST use your Email as Sender. Thats the reason for the spf error, and the error did correctly occur.
I can recieve all emails wich have the Sender …@devart.com, so I can do like you suggested and hope you send notification About nighty build with your own email as Sender.

[SMTP 000618 11-07-18 10:28:34] EHLO mail.devart.com
[SMTP 000618 11-07-18 10:28:34] 250-Welcome 5.79.86.80, nice to meet you...
[SMTP 000618 11-07-18 10:28:34] 250-AUTH=PLAIN LOGIN
[SMTP 000618 11-07-18 10:28:34] 250-AUTH PLAIN LOGIN
[SMTP 000618 11-07-18 10:28:34] 250-SIZE
[SMTP 000618 11-07-18 10:28:34] 250-DSN
[SMTP 000618 11-07-18 10:28:34] 250-ETRN
[SMTP 000618 11-07-18 10:28:34] 250-STARTTLS
[SMTP 000618 11-07-18 10:28:34] 250 HELP
[SMTP 000618 11-07-18 10:28:34] STARTTLS
[SMTP 000618 11-07-18 10:28:34] 220 Go ahead
[SSMT 000618 11-07-18 10:28:34] Switching to secure channel. Using Tls12.
[SSMT 000618 11-07-18 10:28:34] EHLO mail.devart.com
[SSMT 000618 11-07-18 10:28:34] 250-Welcome 5.79.86.80, nice to meet you...
[SSMT 000618 11-07-18 10:28:34] 250-AUTH=PLAIN LOGIN
[SSMT 000618 11-07-18 10:28:34] 250-AUTH PLAIN LOGIN
[SSMT 000618 11-07-18 10:28:34] 250-SIZE
[SSMT 000618 11-07-18 10:28:34] 250-DSN
[SSMT 000618 11-07-18 10:28:34] 250-ETRN
[SSMT 000618 11-07-18 10:28:34] 250 HELP
[SSMT 000618 11-07-18 10:28:35] MAIL FROM:<service@lhsoft.de> SIZE=2304
[SSMT 000618 11-07-18 10:28:35] Verifying domain lhsoft.de
[SSMT 000618 11-07-18 10:28:35] Domain is local. Skipping verification.
[SSMT 000618 11-07-18 10:28:35] 250 Sender "service@lhsoft.de" OK...
[SSMT 000618 11-07-18 10:28:35] RCPT TO:<service@lhsoft.de>
[SSMT 000618 11-07-18 10:28:35] User overrides Greylisting. Status is OFF
[SSMT 000618 11-07-18 10:28:35] 250 Local recipient "service@lhsoft.de" OK...
[SSMT 000618 11-07-18 10:28:35] DATA
[SSMT 000618 11-07-18 10:28:35] Checking reverse PTR entry...
[SSMT 000618 11-07-18 10:28:35] Result: mail.devart.com
[SSMT 000618 11-07-18 10:28:35] Checking SPF
[SSMT 000618 11-07-18 10:28:35] TXT Records for lhsoft.de are not in cache
[SSMT 000618 11-07-18 10:28:35] Retrieving TXT records for lhsoft.de using DNS server 178.248.240.4
[SSMT 000618 11-07-18 10:28:35] Registering TXT records with cache
[SSMT 000618 11-07-18 10:28:35] SPF Result: (-) The IP address <ip> is in the not permitted set
[SSMT 000618 11-07-18 10:28:35] Incrementing the counter for IP address 5.79.86.80 in lockout manager: Current=1, Allowed=4
[SSMT 000618 11-07-18 10:28:35] 554 Rejected by SPF: (-) The IP address 5.79.86.80 is in the not permitted set
[SSMT 000618 11-07-18 10:28:35] SMTP connection 000618 on 178.248.246.166:25 with 5.79.86.80:64602 ended
[SSMT 000618 11-07-18 10:28:35] Number of current secure SMTP connections: 0

MaximG
Devart Team
Posts: 1098
Joined: Mon 06 Jul 2015 11:34

Re: Float Error

Post by MaximG » Thu 12 Jul 2018 08:50

We received your message via the e-support form and are now engaged in creating a build including the fix of the described error. We will send you a link to download this build as soon as we finish working on it.

Post Reply