1. mukul pandey
  2. PowerBuilder
  3. Monday, 24 January 2022 14:06 PM UTC

Hi All,


I am using PowerBuilder 2019R2 build 2353 and Oracle 19C.  Recently we upgrade our database from Oracle 12 to 19.  

I have procedure which OUT parameter is date table type. before database migration its return proper value in PB's datetime variable but after migration to 19 C it shows error as "ORA-01866 - the datetime class is invalid". Please help.

Procedure Script:


procedure test_mk (rltn_nbr IN Number, ret_date OUT adt_crt_dt_TYPE)
ret_date(1) := sysdate;
end test_mk;


PowerBuilder Script:-

define subroutine in Local external function:-

subroutine test_mk ( decimal third_pty_rel_seq_nbr, ref datetime ret_date[] ) RPCFUNC ALIAS FOR "MLEQ.PKG_CHANGE_HISTORY.test_mk";

Call in process as:

datetime ld_datetime[1]

sqlca.test_mk(242321595,  ld_datetime)
if sqlca.sqlcode <> 0 Then
return 1
end if


Accepted Answer
René Ullrich Accepted Answer Pending Moderation
  1. Monday, 24 January 2022 14:25 PM UTC
  2. PowerBuilder
  3. # Permalink

Have you checked the "Map PB DateTime/Time to Oracle Timestamp" property in "Syntax" tab in the "Database Profile Setup"? Its is the DBParm parameter Timestamp=1. This is the default.

Try to uncheck it / specify Timestamp=0 in DBParm.

If this helps you have to check if this is ok for your whole application (do you use timestamp?) or if is better to change the type of parameter in your procedure.

  1. mukul pandey
  2. Tuesday, 25 January 2022 09:21 AM UTC
Thanks Rene. I have changed the timestamp in DBParm as you suggested and it is working. Could you have any idea why it is need to change in Oracle 19 c?
  1. Helpful
  1. René Ullrich
  2. Tuesday, 25 January 2022 09:26 AM UTC
No, I don't know about this different behaviour with Oracle 19c.
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 25 January 2022 13:55 PM UTC
Sounds like a bug to me
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Monday, 24 January 2022 15:44 PM UTC
  2. PowerBuilder
  3. # 1

Please upgrade to PowerBuilder 2019 R3.  Oracle 19c was supported in the older version you are using.

  1. Olan Knight
  2. Monday, 24 January 2022 21:34 PM UTC
"... was NOT supported..."

  1. Helpful 1
There are no comments made yet.
mukul pandey Accepted Answer Pending Moderation
  1. Tuesday, 25 January 2022 09:22 AM UTC
  2. PowerBuilder
  3. # 2

Not working with 2019R3. Need to change Timestamp=0 in DBParm.

  1. Armeen Mazda @Appeon
  2. Tuesday, 25 January 2022 16:03 PM UTC
So now it works OK you change Timestamp=0?

You should still use 2019 R3 because that is long-term support version and officially supports Oracle 19c so we did some 19c-specific bug fixes that older versions do not receive.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.