How to fix the system error in powerbuilder

1
0
-1

Hi,

 

When runing an application i am facing a sytem error number 36 (Name not found accessing external object.

How to fix this??

Question Tags: 

Answers

Michael Kramer answered How to fix the system error in powerbuilder

1
+1
-1

Hi Radha,

The error message usually identifies the <class, object, script, line-number> where the error occurs. EX:

My error message Divide by zero at line 5 in clicked event of object cb_2 of w_my_calculator_more.
Line 5 in Clicked event result = a / b
My fix: if b = 0 then
   SetNull(result)
else
​   result = a / b
​end if

Actual fix depends on context. For runtime error 36 I would look for potentially misspelled property name or reference to a non-existent object.

HTH /Michael

Michael Kramer's picture

Hi Radha, add-on to my initial answer.
​If you see runtime error 36 when using .object notation into a DataWindow, well - then try alternate style.

.object notation Alternate code
// Access data in a (row/column)
ls_name = ​dw_1.object.dept_name[row]
ls_name = dw_1.GetItemString(row, "dept_name")
​// You may get "error 6: Invalid DW row/column" 
​// Access data in numbered (row/column)
ldec_salary = ​dw_1.object.data[10,20]
ldec_salary = dw_1.GetItemDecimal(10, 20)
​// You may get "error 6: Invalid DW row/column"
// Change property
dw_1.object.salary.BorderType = ...
string ls_status
ls_status = ​Modify("salary.BorderType = ...")
​if ls_status <> "" then
   ​// ls_status holds error message
end if   
// Read property
ll_borderType = dw_1.object.Salary.BorderType
string ls_border
​ls_border = dw_1.Describe("Salary.BorderType")
​if ls_border = "!" then
   // Error in your "describe"
else
​  ll_borderType = long(ls_border)
​end if