Entity Framework - Model Generation Error: '' ', the hexadecimal value 0x1F, is an invalid character

my Entity data model constructor gives an error with the following message: "'' ', the hexadecimal value 0x1F, is an invalid character.

This error does not occur from all database tables. This table causes only one table in my database, but very strange behavior: the error table is not always the same (but always the same two tables in turn) !!

I saw a script error table in SQL Server Management Studio and cannot find an invalid character ....

I tested this behavior on different computers (one with VS2008 / VS2010 / VS2010 Express. All options gave the same error.

I hope someone can help me.

Thanks and best regards.

+3
source share
2 answers

I had a similar problem when trying to create an edm model for a database created using SQL Server Management Studio. When I opened the table in question in the SSMS designer, I noticed several columns in square brackets '[', ']'. I renamed the columns removing the square brackets and so that the model creation was successful

+3
source

I had the same problem when the square brackets '[]' are automatically added to columns, keys or index names ... which means that you may have a special character that cannot be printed in the name and you cannot remove the brackets in this case.

, , , , . .

+2

Source: https://habr.com/ru/post/1754151/


All Articles