Reputation: 9312
I'm reading a DB2 database in C# using ODBC, and getting an overflow when trying to access that data from a DataReader. I think the issue is that the DB2 client is not set to report the data types properly. For example, it shows character fields as being type "GRAPHIC() CCSID 13488" which is IBM gobbledygook to me. The overflow comes when .NET tries to read a field that I know is a 12-character string as an Int32.
Long ago I worked with DB2 and recall having to set properties in the client, but none of my tweaks are working. Can someone please help out?
The OS is Windows Server 2008 R2, x64 The ODBC driver is named "iSeries Access ODBC Driver", referring to dll CWBODBC.DLL
Here is a screen shot of the setting that I think should be resolving this issue:
Upvotes: 0
Views: 1285
Reputation: 9312
It turns out that the setting shown above "Convert binary data (CCSID 65535) to text" is the correct setting. The issue is that this only works properly in my case when I use the 32-bit driver. So awkward as it is, for now we just be setting our apps to 32-bit until we solve the issue. But at least we have a workaround and the urgency is diminished.
Upvotes: 1