Async and Await
http://blog.stephencleary.com/2012/02/async-and-await.html
AutoCompleteCustomSource and VSHOST crash…
When a crash occurs, check the autocompletesource to remove (or manage) all null values that may be displayed in the source…
Shrink database log file
— Shrink the Transaction Log USE DatabaseName GO DBCC SHRINKFILE(, 1) BACKUP LOG WITH TRUNCATE_ONLY DBCC SHRINKFILE(, 1) GO
[HowTo] Remove Time from date in SQL
–The correct way (new since Sql Server 2008): cast(getdate() As Date) –The correct way (old): dateadd(dd, datediff(dd,0, getDate()), 0) –This is older now, but it’s still worth knowing because it can also easily adapt for other time points, like the first moment of the month, minute, hour, or year. –The fast way: cast(floor(cast(getdate() as float)) […]
[Code Sample] GetSoftwareRoot without knowing 64 or 32bit mode
In the case where you explicitly need to read a value written by a 32 bit program in a 64 bit program, it’s OK to hard code it. Simply because there really is no other option. I would of course abstract it out to a helper function. For example : private static RegistryKey GetSoftwareRoot() { […]
Visual Studio 2012 Color Theme
First thing first, here is the tool : http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05 Install via Extension Manager (Tools/Options) Install via Visual Studio Gallery.com (download and open directly or save then double-click) Install via “xcopy” into %appdata%\Local\Microsoft\VisualStudio\10.0\Extensions For Visual Studio 2012 Express, check this link : http://alinconstantin.blogspot.be/2012/09/using-color-themes-with-visual-studio.html How to change Icons : http://vsip.codeplex.com/
Could not load file or assembly ‘xxx.yyy’ or one of its dependencies…
Annoying message … if any… Could not load file or assembly ‘xxx.yyy’ or one of its dependencies. An attempt was made to load a program with an incorrect format. or in French : Impossible de charger le fichier ou l’assembly ‘xxx.yyy’ ou une de ses dépendances. Tentative de chargement d’un programme de format incorrect. Problem […]
[How To] script data in MSSQL Server 2008 R2 using Script Wizard
Right clicking on the DB Click on tasks Click on generate scripts Go through the wizard and select your tables On the options page click the Advanced button Change the “Types of data to script” option, from the default “Schema only” to “Schema and data”.
[HowTo] Can’t save table modifications in ms sql manager : Saving changes is not permitted.
In mssql server manager, when trying to update tables design, you get this message : Saving changes is not permitted. The changes you have made require the following tables to be dropper and re-created. Here is the solution… uncheck the “prevent saving changes that require table re-creation” checkbox as follow :
Clean up Winsxs on Windows 7/2008 R2 after SP1 install
Run (as administrator) the command prompt and type : dism /online /cleanup-image /spsuperseded The worst offender was the Winsxs directory. To read more about what Winsxs actually does, go here. More : @Happy SysAdmin @Alan’s sysadmin Blog