Subject Answer to Error in stored procedures ISC ERROR CODE:335544358: Thanks Jason
Author Adrian Wreyford
I'm just posting this for everyones benefit.

Thanks Jason

Unprepare the stored proc before executing each time and this will get rid
of the problem. This is actually an InterBase bug biting you. IBO used to
smoothe it over but there are cases where it causes other worse problems in
some rare cases. Thus, in order to be 100% safe I just let you know about
the IB bug. Not sure if it got fixed in Firebird yet or not.

Jason Wharton
CPS - Mesa AZ