Page 1 of 1

AsCurrency Problem with latest ODAC Version 8.2

Posted: Wed 04 Jul 2012 11:23
by BMD
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

Re: AsCurrency Problem with latest ODAC Version 8.2

Posted: Wed 04 Jul 2012 13:25
by AlexP
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

Re: AsCurrency Problem with latest ODAC Version 8.2

Posted: Thu 05 Jul 2012 06:03
by BMD
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:

Re: AsCurrency Problem with latest ODAC Version 8.2

Posted: Fri 06 Jul 2012 10:23
by AlexP
hello,

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

Re: AsCurrency Problem with latest ODAC Version 8.2

Posted: Mon 09 Jul 2012 11:37
by kurtbilde
Could you please post estimated time of release?!?

-Kurt

Re: AsCurrency Problem with latest ODAC Version 8.2

Posted: Tue 10 Jul 2012 10:40
by AlexP
hello,

The next build will be available in two weeks.