A few months back I wrote this article on DB2 Data Provider for .NET, describing issues with .NET provider and certain DB2 SQL commands e.g. CURRENT DATE function or CASE statement. As this things go, it took several months to communicate things with IBM tech support and I have to say they were very responsive and managed to tilt me only once. So kudos to them.
Good news is that IBM Tech support did acknowledge this issue. Unfortunately, the bad news is, they cannot do nothing about it, as the problem is in SQL parser in Visual Studio, which uses Other parser for DB2 queries and hence finds a problem with non-standard functions. I was a tad startled by their solution that I should contact Microsoft on this issue. Now, I don’t want to claim that Microsoft doesn’t care about their customer satisfaction, as that would be a lie. However, I sincerely doubt that they care that DB2 Data Provider for .NET, which is IBM’s plug-in for a product that is supposed to be a competition to their MSSQL. works at all.
So, as IBM is not going to talk with Microsoft about this issue, and I am certainly not, it appears that all we can do is wait that one of the big guys comes to their senses and does something about it. Until then, you can use a workaround, which will require you to remove all case statements and CURRENT DATE calls from your typed data-sets at point of creation. You can add them on later and despite reported error, it will work. But beware that data-set will not get generated, if you keep case statements and CURRENT DATE calls.