views:

30

answers:

2

In Linq to SQL SubmitChanges(ConflictMode.ContinueInConflict) i get Exception:

"String or binary data would be truncated. The statement has been terminated."

But how to figure out the Property causing this? I guess i could start testing 1 by 1 the properties but what will happen if i have numerous properties?

A: 

Do you have SP1 installed? Looks like this was fixed.

http://social.msdn.microsoft.com/forums/en-US/linqtosql/thread/8a81482c-194a-4a16-8c04-80a27a90e1f4/

Great news... I installed SP1 for .Net 3.5 and guess what... they provide detailed information now!!!

Example: "Cannot insert the value NULL into column 'FullQualifiedUserName', table 'WcmsDevEmpty.Users.Users'; column does not allow nulls. INSERT fails. The statement has been terminated."

Raj Kaimal
I have .NET 3.5 SP1
A: 

You can set the Log property on your data context to be a stream (such as Console.Out or a log file) to effectively profile the SQL being executed

Rowland Shaw
This would be a pain....for a really complex object
@gtas ...but may point you at where the issue is...
Rowland Shaw