Hi,
Break up your check on isvalid() isnull() in more than one statement like this:
if not isvalid(awo_control) then
return -1
end if
if isnull(awo_control) then
return -1
end if
if isnull(as_method) then
return -1
end if
That way, at least you can find out on which of the checks it's blowing up. The reason why I'm telling you, is that I don't think you can do a "isnull()" on an object that not "IsValid()".
Since you have both in a single if-statement, that might cause a problem.
Also, powerbuilder behaves a bit bunny when comparing null values in an if statement: If anything in the "if" evaluates to "null", pb will always execute the "else" statement (if that's present).
In addition to what you've said about "I have to restart and insert my breakpoints again. ... ".
This is "normal" in PB:
- if you set a breakpoint and the app blows up. that breakpoint is not saved.
- to make sure your breakpoint is at least there every time you run debug, just once: set the breakpoint, run you application and immediately exit your application (without having tested the "blow-up-part").
- now your breakpoint would have been saved and will still be there when you test the "blow-up-part".
regards,
MiguelL
I set the break point there only because I don't know the code well enough yet to know where the query is occurring. That's where it was blowing up so I figured I'd stop it there and see where it went.
I'm using PB 2019 Build 2170. Latest install was Thursday after dealing with other issues.
I actually have the original PB 8 code and a PB 8 IDE. I'm going to see what happens there.