1. Sivaprakash BKR
  2. PowerBuilder
  3. Thursday, 7 March 2019 06:00 AM UTC

Hello,

PB 2017 R3, build 1880, Posgresql 11.1

Calling a function from itemchanged event, which retrieves value from db through a query, 

Select a.name
Into   :ls_name
From  table_a
Where field1 = :ls_where;

Messagebox('return1', sqlca.sqlcode)
Messagebox('return2', sqlca.sqlcode)

It returns 0 first time, 100 second time.    What will be the issue ?

Only this window seems to be the issue. 

We migrated few datawindows from 11.5 to 2017 and one datawindow we used in this window.  We used other datawindows in other windows, which is working perfect.

Creating a new datawindow from scratch returns the values correct.  

What could be the cause of this error ? Any idea ?

Happiness Always
BKR Sivaprakash

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 7 March 2019 17:31 PM UTC
  2. PowerBuilder
  3. # 1

Hi BKR;

  A +100 means return code means: "End of Result Set". Its not an error ... merely an FYI by the DB Client driver.

Regards ... Chris

Comment
  1. Sivaprakash BKR
  2. Friday, 8 March 2019 07:44 AM UTC
Thanks Chris,

Executing the same query in another window returns 0 both times.

Down the line , in the code, I decide further actions based on this sqlca.sqlcode value. Returning two different values on successive execution, makes to mis-behave.

  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 8 March 2019 20:31 PM UTC
Correct... Are you all sorted OK now?
  1. Helpful
  1. Sivaprakash BKR
  2. Saturday, 9 March 2019 04:51 AM UTC
No & Yes Chris,

The issue remains in this window. Tried many..

one among them is to check the query in another window. That's working perfectly there. Seems no issue with the query.

The other is we re-built the dw from scratch, from which we invoked this function. Now the query returns 0 on both successive calls. Strange ... how could a dw, with the same set of fields, could make such a difference in a query invoked in a window function ?

  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.