In today’s day and age we no longer keep our files and resources on one computer. I have 3 laptops, 2 smart phone and tablet. I have been looking for a good intuitive service which can share all my bookmarks across all these devices. Finally I found pocket, this app is amazing. These guys were previously known as “Read it later”. They have amazing iphone, ipad app and very cool chrome plug-in.

http://blogs.msdn.com/b/jasonz/archive/2012/08/15/visual-studio-2012-and-net-framework-4-5-released-to-the-web.aspx
Inbuilt support for
[video]
Dreamers & Realists
A ‘no’ uttered from the deepest conviction is better than a ‘yes’ merely uttered to please, or worse, to avoid trouble.” - Mahatma Gandhi — (Good read in the words of his grand son Arun Gandhi)
(Source: blogs.hbr.org)
Change Target Framework of all the projects automatically
Recently I had a need to change all my project’s target framework to 4.0. Usually you can just right click on the project and change this by going in to properties. I needed to do this for 34 project within a single solution file. After googling I landed on an article by Scott dorman who has written nice macro to do this job automatically.
Change TargetFramework for all the projects in Visual Studio 2010
http://www.codeproject.com/Articles/74805/Visual-Studio-2010-and-Target-Framework-Version
Download Macro project from Here
https://skydrive.live.com/?cid=93D618D639EC9651&id=93D618D639EC9651%21317
In SSRS when you bind a stored proc, it does not always auto populate the column headers. You may end up adding all the columns manually. There is a quick work around for this.
In your stored proc, use EXEC(” your sql query”) instead of storing the text in Variable and then executing the variable. SSRS plays nice if all your columns are laid out in your EXEC statment.
For example this approach will not detect col1 and col2 in SSRS
— Stored proc
Declare @sql varchar(max)
SET @sql = ”Select col1,col2 from table’
exec @sql
This will
— Stored proc
EXEC(‘Select col1,col2 from table’)
Reference:
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/c3c6bc0d-728c-4a6e-abeb-2ea961f38e44
In my daily routine, I use C# as the main language to code. Those from C or C++ world may know what I am talking about.
bool flag1 = true;if(flag1 = false){Console.WriteLine(flag1);}
This is called right hand comparison. Instead I try to follow Left-hand comparison
(http://en.wikipedia.org/wiki/Coding_conventions#Left-hand_comparisons) in which you always put Value on the left hand side of the variable to compare. i.e.if ( false = flag1) then …
This code will always give you compile time error so there is no scope of accidental assignment error.
[video]
Note: This is mainly for small to mid level team and project systems which does not need complex build and deployment processes.
Recently I learned about SQLCMD utility which started shipping with SQL Server 2005 version. IMO you can use this tool and establish a very easy process to deploy database changes from one database to another.
Lets take an example of deploying 20 stored procedures to the production server. Normally I would go into the production server and execute them one by one but it can easily get tedious as the number of changes increase.
One better way to do this is by creating a Patch file and using SQLCMD to deploy changes.
Here are the steps: This method requires that you save your stored procedure on local drive.
1. Create and save patch file
Open text pad and copy paste below. Save file as “<name>.sql” , make sure all your stored procedures are in the same folder. We do this by saving this file under same source control folder where stored procs. are checked-in.
SET NOCOUNT ON
:error “<name>.err”
:on error ignore
USE [<Database>]
GO
PRINT ‘Running Procedures’
:r “..<storedproc_name1>.sql”
:r “..<storedproc_name2> .sql”
:r “..<storedproc_name3> .sql”
PRINT ‘End of Running Procedures’
PRINT ‘The patch is done!’
GO
2. Now open Command prompt and browse to the folder where you have saved patch file. Make sure Patch file is in the same folder as stored procedure. Run below command in command prompt.
sqlcmd -U <userid> -P <password> -S <server> -d <database> -i C:<folders><PatchFileName>.sql
That is it.
All the changes will be deployed to whatever server and database name you provide above.