Stupid Debugger!!!
Posted in 2004
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
I just spent the last 20 minutes going WTF to myself, but I finally figured it out. It seemed that a variable was changing values during a call to a function. I'd confirm the value of everything passed into the function before I called it, the typed in "wh" as soon as I got into the function sort of like this: |$wh |some_func(f_order_det = RECORD, f_blah = 1, f_bah = 1, f_product = 32337) at line 3615 in |crap.4gl Now, the value of product before calling this was 1200 I confirmed all variable types were compatible, even changing f_blah from an Integer in the calling function, since it's a smallint in some_func() and in the database. So, um, 32337 happens to be the same value as the 3rd element of order_det. 1 happened to be right for f_blah and f_bah, but coincidentally they are also the same values you'd find in the 1st 2 elements of f_order_det And what was really making my head spin was that this seemed to be a problem with the debugger, BUT the result seemed to be the same as it was when running under 4Js BDL, which seemed less likely than being struck by lightning while purchasing a winning lottery ticket. Damn! Now that I've got the plank out of my eye, I think I can get to the splinter that's screwing us up. No question here other than does this problem exist in 9.4? Still on 7.3 here, but not for long