Archive for the ‘Code’ Category

Connecting to Excel and Access Files using .Net on a 64-bit Server

Thursday, January 14th, 2010

If you are trying to query a MS Excel (.xls, .xlsx, .xlsb) or MS Access (.mdb, .accdb) file on a 64-bit server and are getting one of the following error messages: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. Then it ...

Fixing the “circular file references are not allowed” Error in ASP.net

Thursday, December 3rd, 2009

If you get the "circular file references are not allowed" error in an ASP.net Website Project and you do not have any controls that have any obvious circular references, what does the error mean and how do you fix it? See this blog post from Siderite Zackwehdex as well as this ...

Optimal Setup for SyntaxHighlighter & TinyMCE

Sunday, November 1st, 2009

My favorite Javascript-based WYSIWYG editor is TinyMCE. I find it the most visually appealing, and the most well constructed from all of the offerings available on the Internet. When posting code for others to see, I prefer using SyntaxHighlighter. This javascript-based formatting tool by Alex Gorbatchev allows you to put the ...

Casting vs. Converting in .Net

Thursday, December 11th, 2008

I recently saw a piece of code in a project that was throwing an exception that I did not understand: string boolString = (string)DataBinder.Eval(DataItem, "IsNew"); One would expect that boolString would be assigned the value "True" or "False" depending on the value of the IsNew property of the DataItem object. However, this ...

Signing Code Using PVK and SPC Files

Thursday, August 28th, 2008

I have a Windows Forms application that is ready for distribution. One of the last steps is getting code-signing working. We purchased a Code Signing certificate from Thawte. This resulted in a PVK (private key) and an SPC (certificate) file being delivered. Then the question arose of how to go ...

Memory Profiler Eating Up My Memory

Tuesday, August 26th, 2008

I have a Windows Forms app that has a very long and complicated initialization process. As the release is approaching, today was my day to try and shoft things around in the init, get it loading faster. So on recommendation from a few sources, I downloaded a profiler - Jet ...