I recently added native support for DB2 8.2 UDB from our product and was doing quite well until I went out for deployment. Many odd errors were occurring throughout the product with the DB2 error: "ERROR [22005] [IBM][CLI Driver] CLI0112E Error in assignment. SQLSTATE=22005 " I couldn't understand how it had worked perfectly in development but failed in deployment. We finally tracked the difference down to the fixpak. I was developing under FP9a and deploying under FixPak 10.
I copied my NUnit testing code over to deployment and ran it and about 1/3 of all of my functions were failing. After several days of troubleshooting I finally tracked it down to the way the DB2 client handles Enums. I was passing the enums directly as stored procedure parameters with no sort of conversion into an Int32 field. After changing the code to do a Ctype(myEnum, Integer), the code is working flawlessly again. Stupid on my part to not convert them directly but Option Strict didn't catch them in the Enterprise Library AddInParameter method. Also very strange that the behavior changed between clients. In the development environment, we were able to verify that even if the database remained on FP9 and the client changed to FP10, the error would occur. So this is a 100% client problem. I don't have a clue how to let IBM know about this but hopefully it will get to them from one of their direct customers. Until then, remember to explicitly convert your datatypes!
No comments:
Post a Comment