AsCurrency Problem with latest ODAC Version 8.2

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
BMD
Posts: 2
Joined: Wed 04 Jul 2012 10:44

AsCurrency Problem with latest ODAC Version 8.2

Post by BMD » Wed 04 Jul 2012 11:23

Hello!

I have upgraded to the latest version of ODAC 8.2 and now I am getting an error with the following code:

Code: Select all

  LargeIntPrecision     := 19;
  lORASession := TOraSession.Create(NIL);
  try
    lORASession.Server    := 'BMDBMDNTCS';
    lORASession.Username  := STDUSER;
    lORASession.Password  := STDPWD;
    lORASession.Connected := TRUE;
    lORASession.Options.EnableLargeint := True;
    lORASession.Options.EnableIntegers := True;
    lORASession.Options.EnableNumbers := True;
    lORASession.Options.EnableBCD := True;
    lORASession.Options.EnableFMTBCD := True;
    if lORASession.Connected then begin
      lQuery := TOraQuery.Create(NIL);
      try
        lQuery.Connection := lOraSession;
        lQuery.UniDirectional := TRUE;
        lQuery.FetchAll := FALSE;

        lQuery.SQL.Text := <XXXX>
[b]        lQuery.Params.FindParam('BUD_SALDO01').AsCurrency := 257.111;[/b]
The .AsCurrency assignment leads to an assertion in
TOraParamDesc.AllocBuffer "Assert(False, SUnknownDataType)"
The datatype at that point is dtCurrency but is unknown?!?
At the moment I fixed it for myself by changing the following code:

procedure TOraParamDesc.AllocBuffer;
Row 4562: from "dtFloat:" to "dtFloat, dtCurrency:"

procedure TOraParamDesc.SetItemAsVariant(Index: integer; const Value: variant);
Row5660: from "dtFloat" to "dtFloat, dtCurrency:"


Could you change the code or if I am wrong could you tell me what's wrong.

Regards

Horst

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: AsCurrency Problem with latest ODAC Version 8.2

Post by AlexP » Wed 04 Jul 2012 13:25

hello,

Thank you for the information, we know about this problem and have already fixed it. This fix will be included into the next version of the product.
You have made correct changes (identical to ours), in addition, in these very methods it is necessary to replace the following line:

Code: Select all

dtDateTime:
with

Code: Select all

dtDateTime, dtDate, dtTime:
to be able to use .AsDate

BMD
Posts: 2
Joined: Wed 04 Jul 2012 10:44

Re: AsCurrency Problem with latest ODAC Version 8.2

Post by BMD » Thu 05 Jul 2012 06:03

Hello,

thanks for the information. Meanwhile I had to change another source:

OraClasses.pas

Methode: function TOCICommand.GetOraType8(DataType: integer; SubDataType: integer): integer;
Row 6685: from dtFloat: to dtFloat, dtCurrency:

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: AsCurrency Problem with latest ODAC Version 8.2

Post by AlexP » Fri 06 Jul 2012 10:23

hello,

Thank you for the information, we will include these changes in the next version.

kurtbilde
Posts: 114
Joined: Wed 16 Mar 2005 16:02
Location: Odense, Denmark

Re: AsCurrency Problem with latest ODAC Version 8.2

Post by kurtbilde » Mon 09 Jul 2012 11:37

Could you please post estimated time of release?!?

-Kurt

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: AsCurrency Problem with latest ODAC Version 8.2

Post by AlexP » Tue 10 Jul 2012 10:40

hello,

The next build will be available in two weeks.

Post Reply