.NET Hawa

Problem With SSRS MultiValued Parameter

In SSRS 2008, some times multi – valued parameter drop down will fire selection event at “Select All”.  Solution is,  first please check the drop down first how many records it is handling if they are < 970, it is your data set fault. Your drop down is handling greater that 970 records it is a rule give by Microsoft guys to handle only 1000 records by default, as asp.net http requests.  Solution for this is, please add below tag to <appsettings> in your report manager web config file.

<add key=”aspnet:MaxHttpCollectionKeys” value=”[yourno.]” />

you can find report manager in sql server instance installation directory

Leave a comment »

Design Patterns – I (Introduction)

Authoring software requires a set of rules and methodologies to take your idea to center point without any rework for future enhancements.  In Software Engineering, we have a set of principles stated by Robert Martin called SOLID principle.   SOLID word has principles as Single Responsibility, Open Close, Liskov’s Substitution, Interface Segregation and Dependency Inversion. Let me explain you about SOLID as one word

SOLID Read the rest of this entry »


Schema Modeling Techniques

A Schema is a collection of Database objects such as Tables, views, Indexes, stored procedures etc.

Querying historical data from databases we use Dimensional Modeling Schema Design.  Dimensional Modeling can be done from both physical and logical levels.  A Dimensional Schema may be logical or physical Schema.  Dimensional Schema can take data from any table or view because it only contains facts and dimensions that have in different columns of the table.   They are 4 – types of Data Modeling Schemas:

  1. Star Schema Read the rest of this entry »
Leave a comment »

Unified Dimensional Model (UDM)

To deal with users who want to retrieve data directly from data source, Microsoft introduced Unified Dimensional Model (UDM) with SSAS 2005 as a part.  SSAS separates the physical layer and modeling part using UDM which supposed to have advantages both of OLTP and OLAP.  UDM will use both Relation Model and Dimensional Model of Data. Read the rest of this entry »

Leave a comment »

Understanding Sql Server Configuration Manager

Sql Server Configuration Manager is a tool to configure the network protocols used by the Sql Server, and to manage network connectivity.

We will find SQL Server Configuration Manager API in below path

 Start -> Microsoft Sql Server 2008 R2 -> Configuration Tools -> Sql Server Configuration Manager.

Sql Server Configuration Manager gets information for WMI (Windows Management Instrumentation) Provider which takes information for “SQLServerManager10.msc” which is located in “C:\Windows\System32\” path.  Generally Sql Server Configuration Manager will use to Start, Stop, resume and Configure services of Sql Server.

sql server configuration manager

Left pane has list of configurations we can do for Sql Server. Read the rest of this entry »

Leave a comment »

Interview With Garbage Collector

Today we have a guest who will carry the job of shredding all unwatend objects while our applications or our Operating Systems are running i.e., Grabage Collector. Let’s Check with him what he can do….

Tech: Hi Sir, how are you ?

GC: I am doing good I hope….

Tech: Sir we have set of questions about to know about you? Read the rest of this entry »

Leave a comment »

Visual Studio 2010 Tips and Tricks

Visual Studio 2010 Tips & Tricks. Daily coding improvements best Visual Studio shortcuts.

via Visual Studio 2010 Tips and Tricks.

Leave a comment »

Performance analsys of Char Method

While we are handling keypress event on text box we majorly we use Char type methods for handling
key press events. Here I am explaining the performance difference between char type methods. Here I
am handling key press event for a textbox which I need validate on key press only allows alphanumeric
characters to say.
For first time I am handling following condition on textbox_keypress event
If Char.IsLetter(e.KeyChar) OrElse Char.IsDigit(e.KeyChar) Then
e.Handled = False
e.Handled = True
End If
This will handle to enter only alphanumeric characters but not special Characters. Performance of this
procedure ranges like this


I gave input as one Integer, One Character and One Special Character any how Special Character will not
allow in the textbox.
On next I am writing same code as:
If Char.IsLetterOrDigit(e.KeyChar) Then
e.Handled = False
e.Handled = True
End If
Following is the performance graph for above code

Explanation of graph is given below:

….To be Continued….

Leave a comment »

Performace Grading in Integer Conversions

  As we are working with .Net, libraries will also have similar meathods for perform single operation we need to know what is the better one and what is a big one. I searched over internet and here i am explaining giving information about some known meathods, Integer.Parse(), Convert.ToInt32(),Integer.TryParse().


Integer.Parse() method should have argument as String datatype. It will parse the string for integer value. If it has no integer value or it contains mixture of integer and characters it will throw you a exception.


Integer.Parse(string S)


Integer.TryParse takes arugments as string and an Integer. This fucntion will return boolean value. This function will work same as Integer.Parse() but it will not throw any exception. If string does not contains any integer value it will return false.

Integer.TryParse(String S, Out Integer I)


This will work as same as Integer.Parse(). So I am not explaining more about this. Convert.Toint32() aceepts null as a argumnet. Integer.Parse() will accept. Convert.ToInt32() internally calls Integer.Parse()

The main difference is taking out with the performance

Integer.TryParse() > Convert.Toint32() > Integer.Parse()

Because Integer.Parse() will throws exception when it has string or null value. Convert.toInt32() check for null string if it is null it will directly throw exception and if it is not null it will call integer.parse() meathod. Integer.TryParse() will try to parse all values and returns boolean values.

Leave a comment »

Mutable and Immutable objects.

While Learning a concept, my strong belif is bottom-up approch is better than top-down approch which gives clear idea. First I will start with Immutable type objects. An Immutable type object means the object which cannot change it’s state once it is created. In some cases, an object is considered immutable even if some internally used attributes change but the object’s state appears to be unchanging from an external point of view. Immutable objects are often useful because they are inherently thread safe.

Immutable objects are sole property of OOP Concepts.Before the advent of OOP, values held in program variables whose content never changed were known as ‘constants’ to differentiate them from variables that could be altered during execution. Examples might include conversion factors from kilogram weights to pounds or the value of Pi to several decimal places. In most object-oriented languages, objects can be referred to using references. Some examples of such languages are Java, C++, C#, VB.NET, and many scripting languages, such as Python and Ruby. In this case, it matters whether the state of an object can vary when objects are shared via references. If an object is known to be immutable, it can be copied simply by making a copy of a reference to it instead of copying the entire object. Because a reference (typically only the size of a pointer) is usually much smaller than the object itself, this results in memory savings and a boost in execution speed.

Immutable objects can be useful in multi-threaded applications. Multiple threads can act on data represented by immutable objects without concern of the data being changed by other threads. Immutable objects are therefore considered to be more thread-safe than mutable objects.

Some of the Examples in different langaugaes:


A classic example of an immutable object is an instance of the Java String class.
String s = “ABC”;

The method toLowerCase() will not change the data “ABC” that s contains. Instead, a new String object is instantiated and given the data “abc” during its construction. A reference to this String object is returned by the toLowerCase() method. To make the String s contain the data “abc”, a different approach is needed.

s = s.toLowerCase();

Now the String s references a new String object that contains “abc”. There is nothing in the syntax of the declaration of the class String that enforces it as immutable; rather, none of the String class’s methods ever affect the data that a String object contains, thus making it immutable.
By default, fields and local variables are mutable. They can be made immutable using the final keyword.

final int j = 42;
j = 43; // does not compile


Best example for Immutable in C# is String Class.

C# Supports Immutability with two key words const and readonly. They are used by the C# compiler to ensure that the state of a field won’t be changed once an object is created.

Mutable Objects:

Mutable Objects are complety opposite to immutable objects where we can modified any where.

Leave a comment »