Issue: Attach to Process: w3wp.exe does not exist!!!

The w3wp.exe will not appear until the first request has entered the pipeline. So if you browse to your site and then open your task manager, you will see the w3wp.exe.

Just create a sample service under DefaultAppPool and browse the service. Now try to attach in VS.

By Sriramjithendra Posted in Others

const and readonly keywords in C#

const variables are implicitly static and they need to be defined when declared.

readonly variables are not implicitly static and can only be initialized once.

E.g.: You are writing a car racing program in which the racing track has a fixed length of 100 Km. You can define aconst variable to denote this as: Continue reading

Static Keyword.

Let’s start with the memory first. Whenever a process is loaded in the RAM, we can say that the memory is roughly divided into three areas (within that process): StackHeap, and Static (which, in .NET, is actually a special area inside Heap only known as High Frequency Heap).

The static part holds the “static” member variables and methods. What exactly is static? Those methods and variables which don’t need an instance of a class to be created are defined as being static.  Continue reading

By Sriramjithendra Posted in C#.NET

Difference between Stored Procedure and User Defined Function in Sql Server

Sr.No. User Defined function Stored Procedure
1  Function must return a value. Stored procedure may or not return values.
2 Will allow only Select statement, it will not allow us to use DML statements. Can have select statements as well as DML statements such as insert, update, delete etc
3  It will allow only input parameters, doesn’t support output parameters. It can have both input and output parameters.
4 It will not allow us to use try-catch blocks. For exception handling we can use try catch blocks.
5 Transactions are not allowed within functions. Can use transactions within Stored procedures.
6 We can use only table variables, it will not allow using temporary tables. Can use both table variables as well as temporary table in it.
7 Stored procedures can’t be called from function. Stored Procedures can call functions.
8  Functions can be called from select statement. Procedures can’t be called from Select/Where/Having etc statements. Execute/Exec statement can be used to call/execute stored procedure.
9 UDF can be used in join clause as a result set. Procedures can’t be used in Join clause

Improve SQL Database Performance


Performance is the main concern of any application. Databases play a very important role in applications. There are some points that can help us to improve the performance of SQL Server. Even small things can help us to improve the performance. A good database design can also help us to improve the performance of a SQL query. Continue reading