PowerBuilder Objects


I have a problem while opening a PowerBuilder Object. When I try to open the object it gives me a message box stating the following:

"Open of User Object u_dwa failed. It has been migrated to current version format, but must also be successfully regenerated. "

What do I need to do for this? I have tried regenerating the object. The following errors were encountered:

 ---------- Regenerate:
 ---------- Regenerating Object u_dwa
coreuo.PBL(u_dwa).u_dwa.buttonclicked.20: Error       C0015: Undefined variable: nv_aw_constants
coreuo.PBL(u_dwa).u_dwa.buttonclicked.22: Error       C0015: Undefined variable: nv_aw_constants
coreuo.PBL(u_dwa).u_dwa.buttonclicked.24: Error       C0015: Undefined variable: nv_aw_constants
coreuo.PBL(u_dwa).u_dwa.buttonclicked.29: Error       C0194: Missing pcode block for indirect function. Possible cause: missing library from library list.
coreuo.PBL(u_dwa).u_dwa.buttonclicked.30: Error       C0194: Missing pcode block for indirect function. Possible cause: missing library from library list.
 ---------- Done Regenerating Object u_dwa
 ---------- Finished

This is a application I have received from the client and I have to add a module in the same. Please help. This is urgent

Thanks & Regards,
Who is Participating?

Improve company productivity with a Business Account.Sign Up

sandeep_patelConnect With a Mentor Commented:
hi sumita,
it's very clear...the object u r opening or regenerating, referes to the variable 'nv_aw_constants'. and your application is not able to find that variable in any of the library that r there in the library path..OK

so make sure that u have received all the libraries from your client and all the libraries are included in the library list...

if it's not there then add the library to list and then try to regenerate...

other option to open the object without that supporting library or the variable is that u have to remove all the references to the variable for that
1)go to the library painter
2)select the librarary and object u_dwa
3) right click on the object and export to the file...
4) it will create the script file for that object
5) open the file in powerbuilder file editor find the text 'nv_aw_constants' and put that line in the comment by '//' and save the file
5) again go to the library painter...select the library having object 'u_dwa'....right click...select import....select the file the u modified...

if still there is any error it will be display while importing the file itself..if it is imported successfully just regenerate again and open it....it will work

still if u found any problem let me know

while commenting the line in script file take care about the loop and if else condition i mean if code is line follow

if nv_aw_constants = 'XYZ' then
      some logic
      some logic
end if

then put comment like

if nv_aw_constants = 'XYZ' then
  some logic
  some logic
end if

if it's in one line then do as follow
//if nv_aw_constants = 'XYZ' then somelogic
once u r able to import successfully and open u can remove this commented according to the requirement and logic...

berXpertConnect With a Mentor Commented:

Just in case you can't get the library where it's the nv_aw_constants object
try build an empty object called nv_aw_constants, mabye it just have some declarations on it and not any logic so while you compile it will display wich constants it has and you can add to you object in the way to regenerate your object.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.