Tuesday, November 9, 2010

HOW TO RUN MULTIPLE INSTANCE OF MSN MESSENGER WITHOUT USING ANY SOFTWARE

Hello Today I am going to show you how to make your MSN messenger 2009, MULTI without using any softwares..


1. Click on run and type regedit and press OK


A window will open like this


2. Now Expand HKEY_LOCAL_MACHINE, than expand SOFTWARE, than expand Microsoft, than expand Windows Live, and than click on Messenger

3. Now on the right side, right click and than New, and than DWORD Value


4. Name it MultipleInstances


5. Double click on it, and Set its value to 1 and click on ok


6. Close registry Editor

:) thats all you should now be able to run multiple instance of msn messenger

Saturday, November 6, 2010

T SQL: UNABLE TO USE COLUMN ALIAS IN WHERE CLAUSE

Since I started working over T SQL I have faces many issues in query and resolved them by walking through blogs, however; one thing that I always thought about, was the reasons behind those issues.

One of those issues is that we can't use column alias in where clause, for instance:

SELECT SUM(CoustmerId) AS OrderCount ... WHERE OrderCount > 2000

We can't do this because in the execution order of an SQL statement SELECT clause executes after WHERE clause.

I thought that was the issue with T SQL compiler, however; later I figured out that the issue is not because of T SQL compiler but because of my lack of knowledge.

I hope this post will help people. Have a nice day.

SQL or SEQUEL

Many database professionals or even other people who have any concern with databases pronounce SQL as sequel, although the correct pronunciation of the language is S-Q-L ("ess kyoo ell"). According to my guess there are both historical reasons and linguistic resons behind it.

We need to look back into the history to know reasone. In the 1970s IBM developed a language called SEQUEL, which was an acronym for Structured English Query Language. This language was designed inorder to manipulate data stored in a database system known as System R. Later on, the acronym SEQUEL was shortened to SQL because of a trademark dispute.

In 1986 ANSI adopted SQL as a standard, and in 1987 ISO did so. ANSI declared that the official pronunciation of the language is "ess kyoo ell," but it seems that this fact is not common knowledge.
.
As far as linguistic reason is concern, the sequel can be pronunced more fluently, mainly for English speakers. I have to say that I often use it myself for this reason.

You can sometimes guess which pronunciation people use by inspecting their writings. Someone writing "an SQL Server" probably uses the correct pronunciation, while someone writing "a SQL Server" probably uses the incorrect one.

So that was the stroy behind SQL and SEQUEL.

Thursday, November 4, 2010

InfoPath: ‘The following URL is not valid: http://servername:portnumber/sites/sitename’ error


When you are trying to publish InfoPath form to SharePoint’s site and the above error is driving you nuts because you have confirmed that that the site is being opening from browser and the URL you are providing is valid then what the is happening, the site is up as well then where you made mistake, where things went wrong.
These are the same questions; this is the same feeling I had when I was facing this issue. After searching over internet I figured out that this is happening because I dint created site at the root level.
Which would be at this http://servrname:port#/ location.
The resolution of this issue is to create root site means creating site at this http://servrname:port#/ level.
Try it and get your InfoPath published. Have a nice day J.

ASP.NET: VIEWSTATE ERROR



This error comes when you are trying to save some object in ViewState. The solution is fairly easy and straight forward.
Solution: Mark the class Serializable, the object of which you want to store in ViewState, for instance you want to save the object of the class TestClass in ViewState. So inorder to get this done you need to marked it as Serializable. Following is the code snippet.
[Serializable]
public class TestClass
{
....
}
But why do you need to mark the class/ type as Serializable, did you ever thought about it. In order to understand this we need to know what Serialization is.
Serialization is the process of changing data (object) representation to binary or XLM.
But still the questions are there, why I need to serialize data in order to save it in ViewState. For this we need to understand when we do serialization.
Whenever we need to send data (object) on wire (means to some other client) we does serialization, because data can only be sent in binary or xml (using soap protocol).
OK! I understand that serialization is used when we need to send data (object) over the wire. But still picture is not clear, what does saving data in ViewState have to do with sending data over the wire.
Actually when we need to store data in ViewState we write following code:
ViewState["Key"] = MyObject;
Right! This is server side code written C#, it runs on server not on the client and ViewState is maintained at client side in a hidden field __VIEWSTATE.
Now we server tries to save data in ViewState (means it will send that data to the client) what happens at backend is server need to send that data back to the client and because of the fact that ViewState is maintained at client side class need to be Serializeable.
Hope this post will help you. Have a nice day :).