error 506 invslid statement handle

Started by scotts, September 22, 2014, 10:48:28 AM

Previous topic - Next topic

scotts

Hi,

I am using code in a new wbt that I have used in the past in other apps. but for some reason I am getting 506 invalid statement handle when I run the new app.
I don't see anything wrong in the code and tried a different environment with still no luck. attached is the code in question.. any help or direction is appreciated.

BTW - version 2013C (looks like it is time to update, but I don't think that is the problem)

td

Which line of your script is generating the error?
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade


td

Your script seems to be more or less boilerplate ODBC extender so I am hard pressed to provide any kind of satisfactory answer. The 'qFetch' function only generates the 506 error when its first parameter does not map to a valid handle in the extender's internal handle table.  But that doesn't make a lot of sense since if the handle is really bad, why doesn't the qExecDirect function catch the problem beforehand. Both functions use the same handle checking.

On the surface this would appear to only happen if there was some kind of memory corruption problem in the extender.  But given how the extender is written, it seems unlikely and why it would show up now is unclear. 

I guess the next question is what is different in the environment between now and when your script last worked successfully?
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

scotts

this is the oddest thing. I basicly cut and pasted into a new wbt file and now it works.. still doesn't work in the original.. huh... moving on, thanks for your help

td

Good you got it working but the mystery remains.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade