THESE FORUMS ARE NOW FROZEN
Please choose "Forums" from the Main menu of www.entityspaces.net to get to our new forums.

MySql & SByte

rated by 0 users
This post has 2 Replies | 0 Followers

Top 100 Contributor
Posts 23
Chris Posted: 05-01-2009 7:39 AM

Recently upgraded a project from entityspaces 2007 to 2009, upgraded .net connector at the same time to version 5.2.5.0 (es 2009 asks for 5.2.3.0 redirected in the assembly binding). When running the project everytime I attempt to access a TINYINT(1) field which entityspaces provides as an nullable sbyte i get an invalid cast exception. After reading this thread - http://community.entityspaces.net/forums/post/868.aspx I decided to redirect to the 5.0.9.0 version of .net connector and the system now works. I've not changed any of the default mappings this is a completely standard template generation (I just change the namespace when generating and select my tables).

Does entityspaces not support TINYINT on mysql with the later versions of the connector?

Top 10 Contributor
Posts 1,675

EntitySpaces has not changed. I believe that MySQL changed the default Connector behavior for TINYINT. They added a Connection String option "Treat Tiny As Boolean", but the default is "true". To maintain back-wards compatibility, you might try adding that to your connection string and setting it to "false".

http://dev.mysql.com/doc/refman/5.1/en/connector-net-examples-mysqlconnection.html#connector-net-examples-mysqlconnection-connectionstring

David Neal Parsons
www.entityspaces.net

Top 100 Contributor
Posts 23
worked perfectly thanks alot :)
Page 1 of 1 (3 items) | RSS
Copyright © 2005 - 2009, EntitySpaces, LLC