9D,1001 Invalid Cursor

Resolution:

Re-enter the code while invalidating the prepare portion.