Topic
  • 1 reply
  • Latest Post - ‏2013-03-06T08:53:12Z by SystemAdmin
SystemAdmin
SystemAdmin
2826 Posts

Pinned topic Saving data to DB2 for IBM i fails with Entity Framework

‏2013-03-03T10:41:41Z |
Hi,

Anyone got any tips what causes updates to fail when saving changes to database?

  • Database is DB2 for IBM i v6.1 with no journaling
  • Driver is IBM Data Server Driver 10.1 FP2
  • All validations are passing
  • Client is written in C# , target framework 4.5
  • One existing table is generated in Entity Framework 4 designer.
  • I have added parameters IsolationLevel=NoCommit and DisableAutoCommit=0 to db2dsdriver.cfg
  • I have added IsolationLevel=Chaos to connectionstring

And still I get error:
{"ERROR 55019 IBMAS SQL7008N REXX variable \"CUSTOMERS \" contains inconsistent data."}
when updating date...

I understood that this issue can happen with no journaling on tables, but I have added those extra parameters to get it work.

Any help would be appreciated. I dont have luxury of putting journaling on at this stage :(
Updated on 2013-03-06T08:53:12Z at 2013-03-06T08:53:12Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    2826 Posts

    Re: Saving data to DB2 for IBM i fails with Entity Framework

    ‏2013-03-06T08:53:12Z  
    Got this resolved. My problem was that I had made some tests with Nhibernate and the tables it had generated were not what I was expecting. All strings were marked as VARGRAPHICS in schema. I didnt have any info how that mapping needed to be done, so it failed. When I changed all VARGRAPHICS to VARCHARS I got it working on inserts and updates