Posted February 21st, 2010 by Wesley
GotSharp is proudly presenting: GotSharp.Extensions!
GotSharp.Extensions is a .NET Class Library containing extension methods and utility classes. Right now, it contains only some extension methods for the System.String and System.IO.Stream classes, and the utility class Range (with implementations Int32Range and DateTimeRange). We will keep updating it however with new functionality. Feel free to give comment or feature requests, but please do so on the project page, hosted at CodePlex.
Posted January 27th, 2010 by Wesley
When I stumbled upon this error “parameter @columnName has no default value”, first thing I tried was Google, of course. When googling, I found lots of answers for this problem, but they all resulted in the following solutions:
-
Parameter name is different in the query and when declaring the parameter (wrong columnName, or wrong parameter assigned – the copy/paste error)
-
The parameters are not in the right order (especially true when querying Microsoft Access databases)
Because you’re reading this, you can assume by now that I hadn’t found a solution for my problem. Well, that’s not entirely true, but I still needed another solution to completely solve my problem.
Read the rest of this entry »
Tags: ado.net, DbCommand, nullable, OleDbCommand, prepared statement
Posted January 14th, 2010 by Wesley
If you’re running Windows 7 and find that from time to time, you PC slows down for 5-10 seconds, try to monitor the System process (NT Kernel & System, or ntoskrnl.exe): chances are that this process is hogging the CPU. If it is, take a look at your network adapter(s) properties and check if LMHOSTS lookup is enabled.
Apparently, there is a bug in the kernel when looking up the LMHOSTS table, causing the CPU to enter a semi-infinite loop. Semi-infinite, because the thread times out after a few seconds.
For more information, look here (original forum post) and the KB article at Microsoft (more specifically, workaround #2). Although the KB article is originally for Windows Server 2003 platforms, it also applies to Windows 7, just don’t try to install the hotfix on you Windows 7 machine!
Tags: cpu, kernel, lmhosts, performance, system, windows 7