You receive a “The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect” exception when using NVarchar parameters with Sqlclient
The problem I got the following random error: You receive a “The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect” exception when using NVarchar parameters with Sqlclient The Solution Its a known bug with the .Net SqlClient Data Provider. If you have a field in the database of type nvarchar(max) [...]
Open XML – OLE Automation Date Issues
If you are exporting a date from C# to Excel using 2007, you probably will use the following: Math.Round(DateTime.Now.ToOADate(), 12).ToString() This exports the date as a OLE Automation date recognized by Excel 2007. How ever, in Excel 2010 this was causing issues, every time I exported to Excel 2010, it said that it has to [...]
Fixing the EF Tracing and Caching Provider Wrapper Issue
If you have been using the Tracing and Caching Provider Wrappers for the ADO.NET Entity Framework 4.0, you might of come across this error message when creating POCO objects, adding them to a Data Context and commiting them to the database using the Caching Wrapper: [NotImplementedException: The method or operation is not implemented.] EFCachingProvider.EFCachingDataReaderCacheWriter.GetName(Int32 ordinal) [...]
Exam 70-536 Part 1 – The journey begins…
I’m beginning my journey into the world of Microsoft Certification. Why? The biggest reason is that the company I’m working for encourages professional development so I have taken up the challenge and the opportunity to sit a few Microsoft Exams. But my biggest reason why is getting one step closer to obtaining a Doctorate in [...]
Could not write lines to file xxx.FileListAttribute.txt Access Denied
Using Visual Studio Team System Edition, you may come across this error when trying to build a solution “Could not write lines to file xxx.FileListAttribute.txt. Access is denied.” Simple solution..delete the files from the obj directory, reload your solution and attempt to build. Rember: Dont add obj/bin folders to your source safe, and these change [...]
Match Whole Words Regular Expressions
Example: Dim regExp As New Regex(String.Format(“\b{0}\b”, keyword), RegexOptions.IgnoreCase) This is the same as doing the following: note.note_content.StartsWith(InputKeyword & " ") OR _ note.note_content.EndsWith(" " & InputKeyword) OR _ note.note_content.Contains(" " & InputKeyword & " ") References: http://answers.oreilly.com/topic/217-how-to-match-whole-words-with-a-regular-expression/ http://stackoverflow.com/questions/810078/search-for-whole-word-with-linq-to-sql
.NET Comment Tags
Here are some useful tags that can be used when using .NET XML documentation: <seealso>, <summary>, <returns> References: http://msdn.microsoft.com/en-us/library/5ast78ax.aspx
Serializing a Data Class (LINQ2SQL) for WCF
Problem I created a class that implements a service contract interface so that I can return an array of data from a WCF service back to the client application. The exposed method in the class return’s an array of Data Classes (an array of records from a database table) generated by the MSLINQ2SQL generator. When [...]


