Homepage | About Me | Testing ASP.net Book | Best Blog Posts | Personal Projects | Follow me on Twitter | GitHub | SlideShare | RSS
Blog.BenHall.me.uk

Linq to SQL Beta 2 to RTM Diagram Error

Thursday, November 22, 2007

After installing RTM on my laptop, I all of my Beta 2 Linq to SQL diagrams refused to open and save the error.

"Cannot load 'path': Error encountered, check Error List window for details".

The error list had the following error

"Error    2    There is no Unicode byte order mark. Cannot switch to Unicode.        1    1    TestingLinqToSQL" 

In the properties for the dialog, it was already set as Unicode. To fix this, in the xml header for the diagram, in Beta 2 it was "<?xml version="1.0" encoding="utf-16"?>".  RTM requires the encoding to be utf-8 (<?xml version="1.0" encoding="utf-8"?>).  Set the xml declaration to this, save and reopen and your diagram should be working again.

Technorati Tags:

Labels:

Blogger comments

I am interested to know how you can also use SPROCs to override the update/insert/delete logic when you SubmitChanges() on your DataContext to persist back to the database.    
At 6:37 PM, Anonymous Jim Wooley said...
Regarding using SPROCs, include methods in the custon Partial class implementation of your entity classes for InsertT, UpdateT, DeleteT, where T is your class name. They will be called instead of the standard runtime dynamically generated SQL statements. Consuming SPROCs with LINQ is as easy as calling functions. Realize that when using SPROCs you loose the automatic concurrency tracking and field use optimizations that LINQ can provide.