Posts

Showing posts from August, 2019

Mysterious Errors in Visual Studio

Today i encountered this weird error after i upgraded one of my Kentico   projects to a new version.  The problem was , i added newer versions of some existing DLL file references to my Visual Studio solution and when i ran the build , it gave me mysterious errors ! Mysterious because even though there is no error seemingly , it gives the red error message and the whole deal. So after much googling i realized that it was my stupid mistake which caused all of this.  Cause of the error was : My project was built on an older .NET version than the one which the new DLLs were built on. So i did not get a clear error message but some generic "missing references" message. p.s - I know i am too stupid to not infer the cause from the "missing reference" message :P . But i will just post this for any future idiots like my self stuck in a rut.

SQL Case Statement

The S QL CASE Statement is a very handy little feature.  I recently had to update several rows of a table at once and i used it to good effect. I have no idea how it will perform when it comes to large updates but for a small amount of rows it works like a charm. Picked up from this SO thread. Multiple update UPDATE config SET config_value = CASE config_name WHEN 'name1' THEN 'value' WHEN 'name2' THEN 'value2' ELSE config_value END WHERE config_name IN ( 'name1' , 'name2' );