Invalid Handle

rash

Member
Can anyone tell me about the following error? & How to resolve it?
---------------------------
Error
---------------------------
Invalid handle. Not initialized or points to a deleted object. (3135)
---------------------------
OK
---------------------------
 

jmac13

Member
well its best when ur are posting on the forum its best to say what version of progress/open edge you are using? and the code you are getting the message in helps aswell

but that message means you havent created a handle correctly
 

skunal

Member
u can check if is-valid(handle-name) then.... else ..... to avoid progress generated error. But the error is coming as the handle is deleted somewhere in your program .....or is not initialised correctly...
 

RealHeavyDude

Well-Known Member
A handle is nothing more than a pointer to an object in memory that you can store on a variable of type handle. When the object has been destroyed ( for example it could have gone out of scope ) the variable won't be cleared too. You need to do this in your code manually.

It is good practice when you destroy a handle-based object that you NULL the accompanying variable to avoid referencing it a time when the object does not exist anymore, or even worse, an object of a different type has been created in the meantime and by chance resides in the same address space in memory.

DELETE OBJECT hMyObject.
ASSIGN hMyObject = ?.

Regards, RealHeavyDude.
 
Top