This project has moved and is read-only. For the latest updates, please go here.
1
Vote

Microsoft Access 2003 column with "Memo" data type field

description

How are the MS Access "Memo" data type fields mapped in the entity framework model implementation of the JetEntityFrameworkProvider ?

comments

RickyTad wrote Mar 21 at 2:20 PM

Same question for "WideString" column type.

bubibubi wrote Mar 21 at 4:44 PM

Memo are string without max length specified.
About "WideString" it should work. It depends on the underling OleDb provider. If you have any issue you can ask here or on stack overflow.

RickyTad wrote Mar 21 at 5:02 PM

Thanks for info.
I did some tests with FluentApi settings for the table with Memo column.

.HasColumnType("string") -> throws exception at first database access
.HasColumnType("text") -> works

No HasColumnType setting at all works too.

For the WideString column it works with

HasColumnType("varchar")

It did not work with

HasColumnType("nvarchar")

The initial FluentApi code that I used was generated by the EntityFrameworkReversePOCOGenerator , after I upgraded the MS Access database to a SQL Server database.

bubibubi wrote Mar 21 at 5:20 PM

Sorry, I did not understand.

Anyway, about memo you don't need to specify HasColumnType. If you specify that the property of the entity is a string and you don't specify maxlength it will be created as memo (text in standard sql).

Microsoft Access does not support ansi strings, everything is unicode so nvarchar is not supported (varchar is already unicode). Also in this case, you don't need to specify HasColumnType. Specifying that the property of the entity is a string should be enough.

bubibubi wrote Mar 21 at 5:22 PM

Just in case, if you don't specify HasColumnType, the same application can work with any supported DBMS without any changes.