Welcome to MSDN Blogs Sign in | Join | Help

September 2009 - Posts

XQuery in SQL Server, some examples

I got an XQuery in SQL Server related question from a colleague the other day. I thought I had the answer, but it showed that I forgot most of it. And of course I hadn’t written down my examples or tests from previous encounters regarding this topic.
Posted by maspeng | 0 Comments

MemberwiseClone by example

I not ashamed of admitting that I do not know everything about everything J For example, I didn’t know that well what the method MemberwiseClone() method does. So, first step was to check the MSDN documentation, found here. "Object.MemberwiseClone Method"
Posted by maspeng | 0 Comments

SGEN gives "Error: The top XML element 'class' from namespace '' references distinct types UserDefinedFunctions.Class and UserDefinedFunctions.Class1."

Another SGEN error that caused me some time to troubleshoot. In this case customer was again calling a web service from a SQL CLR User Defined Function. "How to: Create and Run a CLR SQL Server User-Defined Function" http://msdn.microsoft.com/en-us/library/w2kae45k(VS.80).aspx
Posted by maspeng | 0 Comments

SGEN gives "Assembly ... does not contain any types that can be serialized using XmlSerializer.

The other day I was working a case where a SQL CLR User Defined Function was used. A bit more on this here: "How to: Create and Run a CLR SQL Server User-Defined Function" http://msdn.microsoft.com/en-us/library/w2kae45k(VS.80).aspx and in this case customer
Posted by maspeng | 0 Comments

How to save information about DataSet into the XML when serializing it with WriteXML()

I got a question the other day. How do I serialize my dataset with some descriptive information about the meta data included? Well, ideally we could have a property on the dataset called, for example, Description that would also be serialized. Unfortunately
Posted by maspeng | 0 Comments

"System.Data.Linq.ChangeConflictException: Row not found or changed" Finding the culprit

When updating a data table in SQL Server using LINQ to SQL and the SubmitChanges() method you may encounter the following exception: System.Data.Linq.ChangeConflictException: Row not found or changed. at System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode
Posted by maspeng | 0 Comments
Filed under:

Why massive inserts using SubmitChanges lack in performance.

Bulk inserting using LINQ to SQL, why is it so slow? Well, the short answer is that it is not designed to do bulk inserts. But out of curiosity, why is it slow? Well, let us do it by example (my preferred way). First create a table in SQL Server like
Posted by maspeng | 0 Comments
Filed under:
 
Page view tracker