PowerBuilder · Runtime error
What does R0002: Null object reference mean in PowerBuilder?
The application referenced a property or method on an object reference that is currently null, commonly a DataWindow control or DataStore that was never assigned an actual DataWindow object, only declared.
The application referenced a property or method on an object reference that is currently null, commonly a DataWindow control or DataStore that was never assigned an actual DataWindow object, only declared.
Confirm the DataWindow object was actually created and assigned before use, not just declared. A DataStore or DataWindow control is a container; it needs SetTransObject and an actual dataobject assignment, or a call like Create(), before its properties and data can be referenced. This is the single most common runtime error reported in PowerBuilder forums, and it is thrown by the NullObjectError system exception class specifically so it can be caught separately from other runtime errors.