开发者

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

开发者 https://www.devze.com 2023-01-06 22:56 出处:网络
my Entity Data Model designer gives an error, with the following message: \"\'\'\', hexadecimal value 0开发者_高级运维x1F, is an invalid character.\"

my Entity Data Model designer gives an error, with the following message: "''', hexadecimal value 0开发者_高级运维x1F, is an invalid character."

This error comes not from all database tables. Only one table of my database produce this error, but the very strange behavior is, the error table is not allways the same one (but always alternately the same two tables)!!

I saw the error table script in the SQL Server Management Studio and i can't find some invalid character....

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

I hope somebody can help me out.

Thanks and best regards.


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


I had the same issue where the square brackets '[]' automatically added to columns, keys or index names...which means you might have a special non-printable character within the name and you cannot remove the brackets in that case.

The solution is to rename the target by typing on the keyboard, do not copy and paste because that will copy the special character. Once it's fixed, the brackets shouldn't be added again.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号