Topic
  • 7 replies
  • Latest Post - ‏2012-05-15T16:24:29Z by SystemAdmin
Nopz
Nopz
4 Posts

Pinned topic Error when creating an ADO.NET Entity Data Model

‏2012-05-09T18:49:50Z |
So I'm trying to create an ADO.NET Entity Data Model with the latest DB2 provider 9.7 fix pack 5.

I can connect to the database just fine and browse all of the objects in the database just fine.

Just as a very simple example, I tried to select one table to see it generate the model but I always get this error no matter what objects I select.

ERROR 42846 IBMDB2/AIX64 SQL0461N A value with data type "SYSIBM.SMALLINT" cannot be CAST to type "SYSIBM.VARCHAR".

The table I am selecting does not even contain a SMALLINT column.

Does anyone have any clue how to get this to work? I'm at a loss here.
Updated on 2012-05-15T16:24:29Z at 2012-05-15T16:24:29Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    2826 Posts

    Re: Error when creating an ADO.NET Entity Data Model

    ‏2012-05-09T19:08:25Z  
    Hi,

    what's the version of the server you're connecting to? Also, what version of EF are you using?
  • Nopz
    Nopz
    4 Posts

    Re: Error when creating an ADO.NET Entity Data Model

    ‏2012-05-09T19:34:41Z  
    Hi,

    what's the version of the server you're connecting to? Also, what version of EF are you using?
    Not sure the exact version of the server but I'm told it's 9.x

    I'm using Visual Studio 2010 so I'm sure it's version 4.0 of EF... how would I look this up?
  • Nopz
    Nopz
    4 Posts

    Re: Error when creating an ADO.NET Entity Data Model

    ‏2012-05-10T12:50:24Z  
    From my point of view this DB2 Entity Provider is clearly broken if I cannot create a model for a single table and just keep getting the same errors regardless of the objects I pick.
  • SystemAdmin
    SystemAdmin
    2826 Posts

    Re: Error when creating an ADO.NET Entity Data Model

    ‏2012-05-10T15:25:41Z  
    • Nopz
    • ‏2012-05-09T19:34:41Z
    Not sure the exact version of the server but I'm told it's 9.x

    I'm using Visual Studio 2010 so I'm sure it's version 4.0 of EF... how would I look this up?
    If you look at your server explorer connection, you will see the server version specified in between the [].

    For example: http://DB2/LINUXX8664 09.07.0006

    That will give you the exact server version.
  • SystemAdmin
    SystemAdmin
    2826 Posts

    Re: Error when creating an ADO.NET Entity Data Model

    ‏2012-05-10T15:27:29Z  
    If you look at your server explorer connection, you will see the server version specified in between the [].

    For example: http://DB2/LINUXX8664 09.07.0006

    That will give you the exact server version.
    Sorry. It took stuff between [] and converted it to URL. Here's what is should have looked like:

    
    [DB2/LINUXX8664 09.07.0006]
    
  • Nopz
    Nopz
    4 Posts

    Re: Error when creating an ADO.NET Entity Data Model

    ‏2012-05-11T13:25:04Z  
    Sorry. It took stuff between [] and converted it to URL. Here's what is should have looked like:

    <pre class="jive-pre"> [DB2/LINUXX8664 09.07.0006] </pre>
    http://DB2/AIX64 09.05.0006

    Hopefully that helps :)
  • SystemAdmin
    SystemAdmin
    2826 Posts

    Re: Error when creating an ADO.NET Entity Data Model

    ‏2012-05-15T16:24:29Z  
    • Nopz
    • ‏2012-05-11T13:25:04Z
    http://DB2/AIX64 09.05.0006

    Hopefully that helps :)
    Hi,

    yes it does, thanks. The issue has been identified and the solution available in the future release. If you're interested in an immediate fix, you can contact IBM technical support, and specify that you're looking for a fix for APAR IC83349 for your FP5 release.

    Regards,
    Alex