on 2015 Jun 18 3:08 AM
I'm using
iAnywhere.Data.SQLAnywhere.v4.5, runtime version: v4.0.30319, Version 12.0.1.38734 VisualStudio 2012
When adding a column via Entity Framework:
AddColumn("TableName", "ColumnName", c => c.Boolean(nullable:true));
or
AddColumn("TableName", "ColumnName", c => c.Boolean());
This has a result that a column is created with Type of BIT in the remote client, BUT Unfortunately, the column is not nullable.
This approach DOES work for other types like integer.
Workaround 1. perform following query:
ALTER TABLE TableName ALTER ColumnName NULL
This only works when the table has no data. if it already has data => exception => "Table must be empty"
Workaround 2.
use regular sql instead of EF commands:
alter table TableName add ColumnName bit NULL;
Where do I report this? Anyone seen anything like this before?
Request clarification before answering.
User | Count |
---|---|
39 | |
15 | |
9 | |
7 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.