So I recently "inherited" at my workplace an ASP.Net project that makes use of iDB2 for .Net, but this solution doesn't appear functional.
No one else at my workplace has worked with this solution before, except one guy who quit a month or so ago, no one really has experience with iDB2, and the documentation on this project is largely non-existent. The few scraps of documentation that exist say that the only version of iDB2 which works with this project is version 5.4, which is the version I have and am running.
The problem I'm having, is that almost every single time iDB2 is invoked, I get the following error:
"iDB2DCFunctionErrorException An unexpected exception occurred. Type: System.AccessViolationException, Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.."
Does anyone know what this error means or how to fix it?
Tinkering with this solution, I've found some other weird behavior. It almost seems, based on the examples of iDB2 being used with .Net I can find on the internet, like the project I've inherited is using the wrong syntax.
For example I have a line that reads "Convert.ToString(reader("WETERM"))", where "WETERM" is the name of a field returned by the as400 query. However I can get this line to work if I re-write it in the manner of syntax I have seen online, "Convert.ToString(reader.GetValue(0))".
This makes it almost seem like I am working with the wrong version of iDB2, since it seems like the syntax that works is far different from the syntax that is being used. Is anyone familiar with the syntax this solution appears to be using?
Any help that can be offered on getting rid of this error would be greatly appreciated, since I'm now responsible for getting this broken project working and no one at my workplace has a clue on how to accomplish this.