TUniParam - Set String in Value for TDateTimeField

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
leonardt.neugebauer
Posts: 32
Joined: Wed 27 May 2020 06:22

TUniParam - Set String in Value for TDateTimeField

Post by leonardt.neugebauer » Wed 21 Apr 2021 09:25

Hello,

since UniDAC 8.4 we have problems with StoredProcedures. ( see examples below )
With version 8.3.2 it works without problems in both cases.

TIMESTAMPTEST in this examples is a timestamp parameter.
DBMS Firebird 3

Code: Select all

  
  lStoredProcedure.StoredProcName := 'TEST';
  lStoredProcedure.Prepare;
  lStoredProcedure.ParamByName( 'TIMESTAMPTEST').Value := '21.04.2021'; 
  lStoredProcedure.ExecProc;
  
//Errormessage: "value exceeds the range for valid timestamps."  
  

Code: Select all

  
  lStoredProcedure.StoredProcName := 'TEST';
  lStoredProcedure.Prepare;
  lStoredProcedure.ParamByName( 'TIMESTAMPTEST').AsDateTime := StrToDateTime( '21.04.2021'); 
  lStoredProcedure.ExecProc;
  
// works  
  

frickler
Posts: 37
Joined: Wed 04 Apr 2018 08:30

Re: TUniParam - Set String in Value for TDateTimeField

Post by frickler » Fri 23 Apr 2021 13:11

Have you tried using ISO format for dates, e.g. '2021-04-22' instead of '22.04.2021'?

leonardt.neugebauer
Posts: 32
Joined: Wed 27 May 2020 06:22

Re: TUniParam - Set String in Value for TDateTimeField

Post by leonardt.neugebauer » Mon 26 Apr 2021 07:16

No, but it doesn't matter.
With the format 22.04.2021 it worked with the old version. So why not anymore?
This is a standard format in Germany.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TUniParam - Set String in Value for TDateTimeField

Post by ViktorV » Thu 29 Apr 2021 15:56

Thanks for your time and information provided in your request.
Kindly note that our team is currently investigating the issue and once we have the results, we will immediately get back to you.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TUniParam - Set String in Value for TDateTimeField

Post by ViktorV » Fri 09 Jul 2021 13:17

Hi there,

We have fixed this bug and will include the fix into next build of UniDAC which is planned to be released next week.

Best regards,
Viktor

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: TUniParam - Set String in Value for TDateTimeField

Post by ViktorV » Fri 16 Jul 2021 14:14

Hi there!

Hope you are doing fine!
Kindly be informed that this bug has been fixed.
The fix was also implemented in the current release UniDAC 8.4.4, which is already available for download!
Let us know if there are any questions.

Regards,
Viktor

Post Reply