Search This Blog

Monday 19 May 2014

Build Vs Rebuild Vs Clean

Build means compile and link only the source files that have changed since the last build.
If they have not changed those files will not be touched.

while Rebuild means compile and link all source files regardless of whether they changed or not.
Rebuild will build everything from scratch, irrespective of if there is code change in the file or not.
Rebuild solution will clean and then build the solution from scratch.
Rebuild = Clean + Build

Clean Solution will delete all compiled files (i.e., EXE’s and DLL’s) from the bin/obj directory

Monday 5 May 2014

Custom exception in sql server

RAISERROR can either reference a user-defined message stored in the sys.messages catalog view or build a message dynamically. The message is returned as a server error message to the calling application or to an associated CATCH block of a TRY…CATCH construct.

RAISERROR (N'This is message %s %d.', -- Message text.
           10, -- Severity,
           1, -- State,
           N'number', -- First argument.
           5); -- Second argument.
-- The message text returned is: This is message number 5.
GO