1. Clifford Gregory
  2. PowerBuilder
  3. Wednesday, 3 February 2021 18:32 PM UTC

I installed the latest version of Powerbuilder yesterday and re-compiled my program. This morning I get an error on a line of code that was working before the latest install. The error message reads: “Null object referenced at line 110 in clicked event …..”.

Line 110 in BOLD below:

 

105           DECLARE proc_Email_PO_APR_REJ PROCEDURE FOR dbo.proc_Email_PO_APR_REJ

106                @user_name = :ls_user, @date = :ldt_now, @pm = :is_pm, @alt1 = :is_alt1, @alt2 = :is_alt2

107                                                        

108            USING SQLCA;

109                                                                        

110           EXECUTE proc_Email_PO_APR_REJ;

 

Why am I getting an error on executing a stored procedure with the new IDE?

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 4 February 2021 14:29 PM UTC
  2. PowerBuilder
  3. # 1

and my last suggestion:

Activate Tracing by Adding "TRACE " before whatever you have in your sqlca.DBMS value. See if it catches some error before the error.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 4 February 2021 13:15 PM UTC
  2. PowerBuilder
  3. # 2

Which sqlca.DBMS? It seems you are using ODBC? (since you have an entry for "pbNewSPinvocation" set to yes in your dbparm? What database are you using?

Do you rely on the distribution / presence of maybe pbodb190.ini?

If so, remember that in 2019 R3, this filename now should be named PBODD.INI, without any numbers in the name.

regards

Comment
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Thursday, 4 February 2021 12:37 PM UTC
  2. PowerBuilder
  3. # 3

Have you checked the values of all your variables in line 106 in debugger right before line 110 to be sure none are null?

@user_name = :ls_user, @date = :ldt_now, @pm = :is_pm, @alt1 = :is_alt1, @alt2 = :is_alt2

I know you said it worked before, but as Chris mentioned, maybe the timing of events has changed slightly and one of those variables is null.

Comment
  1. Clifford Gregory
  2. Thursday, 4 February 2021 12:41 PM UTC
All variables were verified before reporting this.

Thank you.
  1. Helpful
There are no comments made yet.
Clifford Gregory Accepted Answer Pending Moderation
  1. Thursday, 4 February 2021 12:35 PM UTC
  2. PowerBuilder
  3. # 4

 "ConnectString='DSN=EpicEsso;UID=pbuser;PWD=pbuser',CallEscape='No',DisableBind=1,DisableUnicode=1,Maxconnect=250,PBNewSPInvocation='yes'"

Comment
There are no comments made yet.
Clifford Gregory Accepted Answer Pending Moderation
  1. Thursday, 4 February 2021 11:55 AM UTC
  2. PowerBuilder
  3. # 5

1. Yes, it runs on the SQL database without error.

2. Yes, the parameters are the same as before. No change.

3. Yes, SQLCA is valid.

4. Made no difference.

5. Yes, rights were verified.

6. Yes, variables hold appropriate values. Verified.

Thank you for your response. This new version is killing me. There are other odd things that are happening that I do not understand their cause. I've never had the slightest problem with a PB upgrade until this version. 

Comment
  1. Miguel Leeuwe
  2. Thursday, 4 February 2021 12:04 PM UTC
Just out of curiosity. What values do you have in your SQLCA properties, dbparm, dbms, etc. ?
  1. Helpful
There are no comments made yet.
Clifford Gregory Accepted Answer Pending Moderation
  1. Thursday, 4 February 2021 11:48 AM UTC
  2. PowerBuilder
  3. # 6

Did 2 full re-compiles before creating this message. Each time the user and I still see the same message as originally entered. 

Thank you for your response.

Comment
There are no comments made yet.
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Thursday, 4 February 2021 09:59 AM UTC
  2. PowerBuilder
  3. # 7

Hi Clifford,

It seems that the error message you provided isn’t matched with the 110 line code.

I suggest you:

  1. Reinstall PB 2019 R3 IDE and then Full Build your application to see if the same error exists.
  2. Can you find out something new if you debug your application? 

Regards,

Ken

Comment
  1. Miguel Leeuwe
  2. Thursday, 4 February 2021 10:28 AM UTC
That's a very good observation.

Clifford, if - when debugging - you get weird jumps to incorrect lines of code, then you have to do a full rebuild, check if there are any errors, warnings.

Maybe also you have to 'optimize' all of your pbl files.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 4 February 2021 04:12 AM UTC
  2. PowerBuilder
  3. # 8

Hi,

1. Can you run the stored procedure "outside" of powerbuilder? Like in Oracle Sql Developer or Microsoft Management Studio. (maybe it needs recompiling)

2. are your sqlca dbparm parameters the same as before?

3. are you connected when the code runs, is SQLCA valid?

4. try declaring the stored procedure without the "dbo."

5. do you have the proper rights for the user to execute this stored procedure?

6. Do your variables all hold an appropiate value? Is there any OUT parameter?
@user_name = :ls_user, @date = :ldt_now, @pm = :is_pm, @alt1 = :is_alt1, @alt2 = :is_alt2

That's all I can come up with for now,

regards

Comment
  1. Miguel Leeuwe
  2. Thursday, 4 February 2021 04:30 AM UTC
Maybe it's a good idea to make a simple window with a button on it and simply try to do some code to only call that stored procedure and nothing else and see if it also fails.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 3 February 2021 19:38 PM UTC
  2. PowerBuilder
  3. # 9

Hi Clifford;
   I would recommend using the PB IDE's "debugger" to step through your code.

   Note that R3 has changed a few events like the Activate and Open "timing" wise. So you may need to wrap your code in an IsValid() command. Food for thought.

Regards ... Chris

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Wednesday, 3 February 2021 18:40 PM UTC
  2. PowerBuilder
  3. # 10

what error information does SQLCA contain after the declare?

Comment
  1. Clifford Gregory
  2. Wednesday, 3 February 2021 18:45 PM UTC
None, that I can see.
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 4 February 2021 04:14 AM UTC
What does it contain BEFORE the declare?
  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.