<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6491959455773035792</id><updated>2011-07-08T05:51:54.628-07:00</updated><category term='abstract classes and interfaces'/><category term='Classic ASP Basics - 1'/><category term='Readonly fields in C#'/><category term='Normal Forms in SQL Server'/><category term='Events in GridView'/><category term='Few ADO.NET points for reference'/><category term='ADO.NET basics reference'/><category term='Authentication and Authorization'/><category term='Changing color of a cell in datagrid and gridview contros in asp.net'/><category term='Constructors in C#'/><category term='interview questions in dotnet'/><category term='AJAX basics'/><category term='access modifiers in C#'/><category term='stored procedures vs functions'/><category term='Partial Classes in C#'/><category term='Delegates in C#'/><category term='Classes in C#'/><category term='classes and structs in C#'/><category term='experienced people in dotnet'/><category term='Cursors in SQL Server'/><category term='Using unsafe code in C#'/><category term='Indexers in C#'/><category term='ASP.Net Page life cycle'/><category term='COM Basics'/><title type='text'>ASP.NET, C#, SQL Server Reference</title><subtitle type='html'>A Complete Dotnet Reference with Examples</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>38</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-7867535942273643945</id><published>2010-06-30T06:15:00.000-07:00</published><updated>2010-06-30T06:16:15.467-07:00</updated><title type='text'>HttpHandlers and HttpModules- simple overview</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;HttpHandlers and HttpModules&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;===========================&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- If we want to inject some logic before the page is requested then we can use HttpHandlers and HttpModules. ASP.NET provides two ways of injecting logic in the request pipeline HttpHandlers and HttpModules.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Client --------------------------------------------------------------------&amp;gt; Server(.aspx page)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:2'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;inject some logic here before req reaching to server&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Best examples are URL rewriting, authorization and authentication, stat counters, etc.,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;HttpHandler&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;===========&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- HttpHandler - is the Extension Based Preprocessor - injects the logic based on the extension of the page requested.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Client----------------&amp;gt; .aspx&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:2'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Handler1&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;-----------------&amp;gt; . jpg or .gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:2'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Handler2&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- when any client requests for file with extension &amp;#8216;.aspx&amp;#8217;, handler1 pre-processing logic executes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- a class needs to be implement IHttpHandler interface and provide implementation to two methods ProcessRequest, IsReusable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;HttpModule&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;==========&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- HttpModule - is the Event Based Preprocessor&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- HttpModule events&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;BeginRequest&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;AuthenticateRequest&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;AuthorizeRequest&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PreRequestHandlerExecute&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PostRequestHandlerExecute&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EndRequest&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;-Modules are called before and after the handler executes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Client --&amp;gt; Module --&amp;gt; Module --&amp;gt; Handler --&amp;gt; Module --&amp;gt; .aspx&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;-implements IHttpModule interface&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-fareast-font-family:"Times New Roman"; mso-no-proof:yes'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-7867535942273643945?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/7867535942273643945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/httphandlers-and-httpmodules-simple.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7867535942273643945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7867535942273643945'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/httphandlers-and-httpmodules-simple.html' title='HttpHandlers and HttpModules- simple overview'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-1084477533926265946</id><published>2010-06-21T03:47:00.001-07:00</published><updated>2010-06-21T03:47:30.940-07:00</updated><title type='text'>Dotnet Remoting - Simple Overview</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;* Remoting is nothing but from an application we can call remote objects that is in the same computer or on different.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;* Remoting is nothing but communication between two application domains.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;* Remoting is nothing but cross process communication called Marshalling&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;* Two types of marshalling&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;- Marshal by value(MBV): server creates a copy of the object and passes onto the client&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;- Marshal by Reference(MBR): Client creates a proxy and then uses that proxy to access the object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;MBV is better for small objects and MBR is better for large objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;* A channel is an object that implements communication between a client and a remote object. There are two types of channels.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;- HttpChannel - formats messages into xml SOAP format&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;- TCPChannel - binary format&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;While creating server class that contains remote object, you also define and register one or more channels for the class and&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp; &lt;/span&gt;associate each channel with a specific port. In the client, your code also creates a channel associated with a specific&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;port, and then uses the Activator class to obtain a reference to the remote object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Remoting Overview&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;==================&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;To build Remote application we need the three parts&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;1) A remotable object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;2) A host application domain to listen for requests for that object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;3) A client application domain that makes requests for that object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;How Remoting works ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;When client creates an object using &amp;quot;new&amp;quot; for remotable object, then the remoting system creates a proxy of the remotable object and returns the reference to the client. When the client calls a method of the remotable type it actually call the method on the created proxy. The remoting system receives that call and routes it to the server process, it then processes the request, and returns the result to the client proxy, which in turn returns it to the client application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Channels:- We will use channels to communicate across application domain boundaries. We used channels to send and receive messages. Channels are objects responsible of handling the network protocols(HTTPChannel, TCPChannel) and serialization formats on your behalf&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;namespace used is System.Runtime.Remoting&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;1) Building a Remotable Type&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- If you want to call an object of a class from outside of application domain, then the class must inherit from &amp;quot;MarshalByRefObject&amp;quot; class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Ex:-&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Public Class TheRemotableObject&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Inherits MarshalByRefObject&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Private List As String() = {&amp;quot;String1&amp;quot;, &amp;quot;String2&amp;quot;, &amp;quot;String3&amp;quot;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Public Function ViewItem(ByVal ItemNum As Integer) As String&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;If ItemNum &amp;gt; List.GetUpperBound(0) _&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Or ItemNum &amp;lt; List.GetLowerBound(0) Then Return &amp;quot;Error&amp;quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Return List(ItemNum)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;End Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;End Class&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;2) Building a Host Application&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- When&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Using channels&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;What is an application domain?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Application domain is like an operating system process. Application domain is used to isolate applications from one another. A single CLR operating system process contains multiple application domains.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;What is .NET Remoting ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Communication between application domains&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Which class does the remote object has to inherit?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;MarshalByRefObject - If you want to call an object of a class from outside of application domain, then the class must inherit from &amp;quot;MarshalByRefObject&amp;quot; class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;what are two different types of remote object creation mode in .NET&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-fareast-font-family:"Times New Roman"; mso-no-proof:yes'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-1084477533926265946?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/1084477533926265946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/dotnet-remoting-simple-overview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1084477533926265946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1084477533926265946'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/dotnet-remoting-simple-overview.html' title='Dotnet Remoting - Simple Overview'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-3749145478799243965</id><published>2010-06-03T02:40:00.001-07:00</published><updated>2010-06-03T02:40:45.893-07:00</updated><title type='text'>Dotnet FAQ's</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal style='text-indent:.5in'&gt;What is the difference between CLS and CTS and what are they.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;3.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is a NameSpace. Why do we need it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;4.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is a GAC. And&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp; &lt;/span&gt;where is the Location of GAC.&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp; &lt;/span&gt;How do we register a dll in GAC?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;5.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is a GC (Garbage Collector). How it will work. How can we get back the object after GC collects?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;6.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is the Algorithm GC use?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;7.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is an App Domain? What is the use of it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;8.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is a DLL HELL and How the .NET overcome it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;9.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is a Cache and how can we Enable it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;10.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is a Pragma Cache?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;11.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is the difference between Machine.Config file and Web.Config file?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;12.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What are the Authentication modes and how the windows Authentication mode works.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;13.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is the NameSpace used for Windows Authentication&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;14.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is the Authorization mode? How do we do the Authorization in .Net. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;15.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Where we use the Authorization and what is the Name of the TAG is used for Authorization.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;16.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What are the Unary operators?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;17.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What are the difference between Execute Scalar and Execute Reader?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;18.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is a TableSpace in DB&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;19.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What are the difference between Stored Procedure and Function?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;20.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is the purpose of Re-compiled Stored Procedure and also Pre-Compiled Stored Procedure?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;21.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;How do we handle the Exceptions in the Stored Procedure?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;22.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is a Transaction and why do we need Transactions?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;23.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;How do we handle the transactions in .NET with Syntax?&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;24.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is your Project Model&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;25.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Tell me about your current project Architecture&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-indent:.5in'&gt;What are the new features of .NET 2005.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;4.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;How to Edit the Data in a Gridview control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;5.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is the use of Object DataSource Control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;6.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Difference between the Object DataSource Control and SQLDatasource Control.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;7.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What are Generics and Why do we requried to use Generics&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;8.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Difference between the Arrays and Arraylist. What is the most important advantages of Arraylist rather than Array.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;9.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Assemblies. What are the steps to install the Shared Assemblies.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;10.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;State Management in ASP.NET what are the new State management features in ASP.NET 2.0&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;11.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is the functionality of Caching. How to invalidate the Data in Caching without requesting the database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;12.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;What is the Hidding concept.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;13.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;How to call the Base class constructor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;14.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;How can we create the instance of the Abstract Class or Interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;15.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;We have a Base Class and Derived Class , how t o call the Derived class constructor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;16.&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Differences between the Interface and Abstrct Class.&lt;span style='mso-fareast-font-family: "Times New Roman";mso-no-proof:yes'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-3749145478799243965?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/3749145478799243965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/dotnet-faqs.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3749145478799243965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3749145478799243965'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/dotnet-faqs.html' title='Dotnet FAQ&apos;s'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-7639057218188946319</id><published>2010-06-02T06:37:00.001-07:00</published><updated>2010-06-02T06:37:45.445-07:00</updated><title type='text'>SQL Server FAQs</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;b style='mso-bidi-font-weight: normal'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt;What maximum size of row is allowed in SQL Server ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif"'&gt;8060 bytes&lt;/span&gt;&lt;span style='font-size: 10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family:"Times New Roman"'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;b style='mso-bidi-font-weight: normal'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt;What is referential integrity in SQL Server ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;We can enforce such referential integrity through foreign key constraints.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;i&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;For an example,&amp;#8230;&lt;/span&gt;&lt;/i&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style='mso-element:para-border-div;border:solid #DADADA 1.0pt;mso-border-alt: solid #DADADA .75pt;padding:0in 0in 0in 0in;background:#FCFCFC'&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;CREATE TABLE Table_Referenced &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;id INT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;CONSTRAINT pk_id PRIMARY KEY(id)--Create Primary Key here&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;CREATE TABLE Table_Referencing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;RID Int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;CONSTRAINT fk_RID FOREIGN KEY(RID)REFERENCES Table_Referenced(id)--Creates foreign key names 'RID' which is referring primary key of Table_Referenced.id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='text-align:justify;background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;b style='mso-bidi-font-weight: normal'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;SET NOCOUNT ON and SET NOCOUNT OFF&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif"'&gt;This Statement turns off the messages that SQL Server sends back to the client after each T-SQL statement is executed. This is performed for all SELECT, INSERT, UPDATE, and DELETE statements&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;b style='mso-bidi-font-weight: normal'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt;How to pass table name as stored procedure parameter in SQL Server 2005 (Write stored procedure) ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;Create PROCEDURE Pass_TableName_As_Param --create procedure &lt;br&gt; @TableName varchar(50) -- Parameter of table name &lt;br&gt; AS &lt;br&gt; BEGIN &lt;br&gt; SET NOCOUNT ON; &lt;br&gt; SET @TableName= RTRIM(@TableName) --Trim the parameter of table name &lt;br&gt; DECLARE @cmd AS NVARCHAR(max) &lt;br&gt; SET @cmd = N'SELECT * FROM'+ @table_name &lt;br&gt; END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:"Times New Roman"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;b style='mso-bidi-font-weight: normal'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt;Maximum number of parameters you can pass in a Store procedure in SQL Server 2005?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;2100&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp; &lt;/span&gt;in sqlserver 2005&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;1024 in sqlserver 2000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;b style='mso-bidi-font-weight: normal'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt;What is the name of the Store procedure to get the listing of current users?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;sp_who&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-align:justify'&gt;&lt;b style='mso-bidi-font-weight: normal'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;Difference between clustered index and non clustered index&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Courier New"'&gt;The leaf level of a clustered index is the actual data and the data is resorted in case of clustered index. Whereas in case of non-clustered index the leaf level is actually a pointer to the data in rows so we can have as &lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;many non-clustered indexes as we can on the db. The Telephone Directory is a fine example of Clustered Index as data and index are at the same page, whereas index in the back side of the book is a fine example of non-clustered index and&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp; &lt;/span&gt;non-clustered index is a fast B-tree structure as index just points to the data page. Also only one clustered index is possible per table and &lt;b style='mso-bidi-font-weight:normal'&gt;249&lt;/b&gt; non-clustered index per table.&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:"Times New Roman"'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is trigger?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;Triggers are special types of stored procedures allows us to execute a batch of SQL code when either an insert, update or delete command is executed against a specific table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;There are four types of triggers. &lt;br&gt; &lt;br&gt; 1. Insert&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp; &lt;/span&gt;2. Delete&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp; &lt;/span&gt;3. Update&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp; &lt;/span&gt;4. Instead of&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is constraints?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;SQL Server users constraints to enforce limitations on the data that can be entered into a particular column in table. There are following types of constraints. &lt;br&gt; &lt;br&gt; Unique, Default, Check, Primary Key, Foreign Key, Not Null.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is the difference between Truncate and Delete?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Courier New"'&gt;Delete command removes the rows from a table based on the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Courier New"'&gt;condition that we provide with a WHERE clause. Truncate will&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;actually remove all the rows from a table. Delete Command require Log file updation for each row of deleting process. But the Truncate command not. Truncate will fail if the concerned table has foreign key constraints while delete doesnt.&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman"'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What's the difference between a primary key and a unique key?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn't allow NULLs, but unique key allows one NULL only.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;ACID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;Atomicity, Consistency, Isolation, Durability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;Atomicity is an all-or-none proposition. &lt;br&gt; &lt;br&gt; Consistency guarantees that a transaction never leaves your database in a half-finished state. &lt;br&gt; &lt;br&gt; Isolation keeps transactions separated from each other until they&amp;#8217;re finished. &lt;br&gt; &lt;br&gt; Durability guarantees that the database will keep track of pending changes in such a way that the server can recover from an abnormal termination.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;Difference Between Implict Transaction And Explict Transaction&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;Implicit Transaction is the auto commit. There is no beginning or ending of the transaction. &lt;br&gt; &lt;br&gt; Explicit Transaction has the beginning, ending and rollback of transactions with the command &lt;br&gt; Begin Transaction &lt;br&gt; Commit Transaction and &lt;br&gt; Rollback Transation &lt;br&gt; In the explicit transaction, if an error occurs in between we can rollback to the begining of the transaction which cannot be done in implicit transaction.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;How to change Database name in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;Use following code &lt;br&gt; &lt;br&gt; Supported in SQL Server 2000 and 2005 &lt;br&gt; exec sp_renamedb &amp;quot;test&amp;quot;, &amp;quot;test1&amp;quot; &lt;br&gt; &lt;br&gt; Supported in SQL Server 2005 and later version &lt;br&gt; ALTER Database &amp;quot;test1&amp;quot; Modify Name=&amp;quot;test&amp;quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is #temp table and @table variable in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;#temp - &lt;span style='color:#333333'&gt;is created and populated on disk, in the system database tempdb. Generally, the table gets cleared up automatically when the current procedure goes out of scope, however, we should manually clean up the data when we are done with it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style='mso-element:para-border-div;border:solid #DADADA 1.0pt;mso-border-alt: solid #DADADA .75pt;padding:0in 0in 0in 0in;background:#FCFCFC'&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;-- create temporary table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;br style='mso-special-character: line-break'&gt; &lt;![if !supportLineBreakNewLine]&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![endif]&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;CREATE TABLE #myTempTable (&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;AutoID int,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;MyName char(50) )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;br style='mso-special-character: line-break'&gt; &lt;![if !supportLineBreakNewLine]&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![endif]&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;-- populate temporary table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;INSERT INTO #myTempTable (AutoID, MyName )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;SELECT &lt;span style='mso-tab-count:1'&gt; &lt;/span&gt;AutoID, MyName &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;FROM &lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;myOriginalTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;WHERE &lt;span style='mso-tab-count:1'&gt;&amp;nbsp; &lt;/span&gt;AutoID &amp;lt;= 50000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;br style='mso-special-character: line-break'&gt; &lt;![if !supportLineBreakNewLine]&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![endif]&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;-- Drop temporary table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;br style='mso-special-character: line-break'&gt; &lt;![if !supportLineBreakNewLine]&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![endif]&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;drop table #myTempTable &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;@table variable&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt; &lt;br&gt; table variable is similar to temporary table except with more flexibility. It is not physically stored in the hard disk, it is stored in the memory. We should choose this when we need to store less 100 records. &lt;br&gt; &lt;br&gt; Syntax: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style='mso-element:para-border-div;border:solid #DADADA 1.0pt;mso-border-alt: solid #DADADA .75pt;padding:0in 0in 0in 0in;background:#FCFCFC'&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;DECLARE @myTable TABLE (&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;AutoID int,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;myName char(50) )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;br style='mso-special-character: line-break'&gt; &lt;![if !supportLineBreakNewLine]&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![endif]&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;INSERT INTO @myTable (AutoID, myName )&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;SELECT &lt;span style='mso-tab-count:1'&gt; &lt;/span&gt;YakID, YakName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;FROM &lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;myTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;WHERE &lt;span style='mso-tab-count:1'&gt;&amp;nbsp; &lt;/span&gt;AutoID &amp;lt;= 50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;br&gt; &lt;br&gt; We don't need to drop the @temp variable as this is created inside the memory and automatically disposed when scope finishes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;How to return XML in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;We can use FOR XML statement at the end of the query to return xml data from the SQL Server. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style='mso-element:para-border-div;border:solid #DADADA 1.0pt;mso-border-alt: solid #DADADA .75pt;padding:0in 0in 0in 0in;background:#FCFCFC'&gt;&lt;pre&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;br style='mso-special-character: line-break'&gt; &lt;![if !supportLineBreakNewLine]&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![endif]&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;select * from mytable for xml auto&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;br&gt; There are three mode of returning XML and they are auto, raw and explicit&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is OPENXML in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;OPENXML can parse the xml data in SQL server very efficiently in SQL Server. OpenXML primarily gives the ability to insert XML data to the relational database, however we can query the data too using OpenXML. We need to specify the path of the xml element using xpath. &lt;br&gt; &lt;br&gt; Syntax: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style='mso-element:para-border-div;border:solid #DADADA 1.0pt;mso-border-alt: solid #DADADA .75pt;padding:0in 0in 0in 0in;background:#FCFCFC'&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;DECLARE @index int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;DECLARE @xmlString varchar(8000)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;SET @xmlString ='&amp;lt;Persons&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;Person id=&amp;quot;1&amp;quot;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;Name&amp;gt;Mohan&amp;lt;/Name&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;PhoneNo&amp;gt;34343&amp;lt;/PhoneNo&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/Person&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;Person id=&amp;quot;2&amp;quot;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp; &lt;/span&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;lt;Name&amp;gt;Sita&amp;lt;/Name&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;PhoneNo&amp;gt;23432&amp;lt;/PhoneNo&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;/Person&amp;gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![if !supportLineBreakNewLine]&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![endif]&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&amp;lt;/Persons&amp;gt;'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt; &lt;br style='mso-special-character: line-break'&gt; &lt;![if !supportLineBreakNewLine]&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![endif]&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;EXEC sp_xml_preparedocument @index OUTPUT, @xmlString &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&lt;/span&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![if !supportLineBreakNewLine]&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![endif]&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;SELECT *&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;FROM OPENXML (@index, 'Persons/Person')&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;WITH (id Varchar(10), Name varchar(100) 'Name' , PhoneNo Varchar(50) 'PhoneNo')&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;br style='mso-special-character: line-break'&gt; &lt;![if !supportLineBreakNewLine]&gt;&lt;br style='mso-special-character:line-break'&gt; &lt;![endif]&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;EXEC sp_xml_removedocument @index&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;&lt;br&gt; &lt;br&gt; The above code snippet will give following result. &lt;br&gt; --------------------------------- &lt;br&gt; 1 Mohan 34343 &lt;br&gt; 2 Sita 23432 &lt;br&gt; ---------------------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is the use of COALESCE in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;Coalesce returns the first non-null expression among its arguments. &lt;br&gt; &lt;br&gt; Lets say we have to return a non-null from more than one column, then we can use COALESCE function. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style='mso-element:para-border-div;border:solid #DADADA 1.0pt;mso-border-alt: solid #DADADA .75pt;padding:0in 0in 0in 0in;background:#FCFCFC'&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;SELECT COALESCE(hourly_wage, salary, commission) AS 'Total Salary' FROM wages&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;&lt;br&gt; &lt;br&gt; In this case, &lt;br&gt; &lt;br&gt; If hourly_wage is not null and other two columns are null then hourly_wage will be returned. &lt;br&gt; If hourly_wage, commission are null and salary is not null then salary will be returned. &lt;br&gt; If commission is non-null and other two columns are null then commission will be returned.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif"'&gt;What is cursor in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:12.0pt'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;A cursor is a set of rows together with a pointer that identifies a current row. &lt;br&gt; &lt;br&gt; In other word, Cursor is a database object used by applications to manipulate data in a set on a row-by-row basis, its like recordset in the ASP and visual basic. &lt;br&gt; &lt;br&gt; Typical syntax of cursor is &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style='mso-element:para-border-div;border:solid #DADADA 1.0pt;mso-border-alt: solid #DADADA .75pt;padding:0in 0in 0in 0in;background:#FCFCFC'&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;DECLARE @fName varchar(50), @lName varchar(50)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;DECLARE cursorName CURSOR -- Declare cursor&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;LOCAL SCROLL STATIC&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;FOR&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;Select firstName, lastName FROM myTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;OPEN cursorName -- open the cursor&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;FETCH NEXT FROM cursorName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;INTO @fName, @lName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PRINT @fName + ' ' + @lName -- print the name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;WHILE @@FETCH_STATUS = 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FETCH NEXT FROM cursorName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;INTO @fName, @lName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PRINT @fName + ' ' + @lName -- print the name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;CLOSE cursorName -- close the cursor&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;DEALLOCATE cursorName -- Deallocate the cursor&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;DESCRIBE is used to see table structure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;How you can get the last identity value inserted in any table ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;@@IDENTITY&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is the maximum size of an SQL Server 2000 Database?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;1,048,516 TB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;how many database can be created on MSSQL Server 2000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;32767&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is the use of @@TRANCOUNT in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;Returns the number of active transactions for the current connection.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is the maximum limit for Primary Key?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;10 fields in MS Acces &lt;br&gt; 900 Bytes in SQL Server&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;Where do you think the users names and passwords will be stored in sql server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;They get stored in master db in the sysxlogins table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is Log Shipping?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;log shipping to feed transaction logs from one database to another&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What Is DTS?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;DTS is a set of tools you can use to import, export, and transform heterogeneous data between one or more data sources, such as Microsoft SQL Server, Microsoft Excel, or Microsoft Access. Connectivity is provided through OLE DB, an open-standard for data access. ODBC (Open Database Connectivity) data sources are supported through the OLE DB Provider for ODBC.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is a tuple?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;A tuple is an instance of data within a relational database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What are three SQL keywords used to change or set someone&amp;#8217;s permissions?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;Grant, Deny and Revoke&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;How to get GUID in sql server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;select newid().&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;Can we create a Foreign Key with out Primary Key?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;Yes. If the table has Unique Key then it is posible to create a Foreign key constraint&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:"Times New Roman";mso-bidi-font-weight:bold'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;Difference between varchar and char:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;varchar &lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-bidi-font-family:Arial;color:#333333'&gt;are variable length strings with a maximum length specified. If a string is less than the maximum length, then it is stored verbatim without any extra characters. &lt;br&gt; &lt;b&gt;char&lt;/b&gt; are fixed length strings with a set length specified. If a string is less than the set length, then it is padded with extra characters so that it's length is the set length.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What is the use of Keyword WITH ENCRYPTION keyword in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;WITH ENCRYPTION keyword is used to encrypt the text of the Stored Procedure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif"'&gt;Microsoft SQL Server's default protocol&lt;/span&gt;&lt;/b&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:"Times New Roman"'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-weight:bold'&gt;Named Pipes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;What are the disadvantages/limitation of the cursor?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;Cursor requires a network roundtrip each time it fetches a record, thus consume network resources. &lt;br&gt; While data processing, it issues locks on part of the table, or on the whole table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman";mso-bidi-font-weight:bold'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt;The maximum number of columns a table can have in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;1024&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;38) How to Get SQL Server Version ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;@@VERSION&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;SELECT &lt;b&gt;@@VERSION&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;39)&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-bidi-font-family:Arial'&gt; What is the Max length of varchar variable in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;8000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;40) What is the Max Length of nVarchar in SQL Server?&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman";mso-bidi-font-weight:bold'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;4000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;41)&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt; What is 'Self-referencing' tables in SQL Server ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;A FOREIGN KEY constraint can reference columns within the same table (a table itself).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman";mso-bidi-font-weight:bold'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;42)&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt; DEFAULT definitions cannot be created on columns defined with the following DATA TYPE ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;Timestamp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;43) What is the Max length of varchar variable in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;8000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;44) Number of PRIMARY KEY/FOREIGN KEY Constraints in a Table in SQL Server 2005/2008 ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;PRIMARY KEY :1, FOREIGN KEY :UNLIMITED (Recommended is 253)&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman";mso-bidi-font-weight:bold'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;45)&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt; How Can we Write the Transaction Block in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;BEGIN TRANSACTION &lt;br&gt; &lt;br&gt; Statement 1 &lt;br&gt; Statement 2 &lt;br&gt; .................. &lt;br&gt; ............... &lt;br&gt; IF(@ERROR&amp;gt;0) &lt;br&gt; ROLLBACK TRANSACTION &lt;br&gt; ELSE &lt;br&gt; COMMIT TRANSACTION&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: "Times New Roman";mso-bidi-font-weight:bold'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;46)&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt; What is the page size in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;8KB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;47) How do you determine the maximum nested-level of Stored Procedure ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;The current nested level can be determine by : @@NESTLEVEL, The maximum nested level is &lt;b&gt;32&lt;/b&gt; .&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial;color:#333333'&gt;48)&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt; Which Function is used to count more than two billion rows in a table?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;COUNT_BIG function - is identical to the COUNT function, but returns a BIGINT data type, whereas COUNT returns an INT&lt;/span&gt;&lt;span style='font-size: 10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family:"Times New Roman"; mso-bidi-font-weight:bold'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;49)&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt; &lt;span style='mso-bidi-font-weight:bold'&gt;SQL Server allows for only 10 levels of nesting in CASE expressions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-weight: bold'&gt;50)&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial'&gt; Is it possible to create Cluster Index on Unique Key Column?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;YES&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;51)How to Get nth Record in a Table?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;First Get the n records fron the table using &lt;br&gt; &lt;br&gt; Select Top n FROM UserTable &lt;br&gt; Now Reverse the Order using identity Column like: &lt;br&gt; Select Top n FROM UserTable Order By 1 DESC &lt;br&gt; &lt;br&gt; Now we need nth record that can be get as &lt;br&gt; SELECT TOP 1 * FROM (Select Top n FROM UserTable Order By 1 DESC)AC &lt;br&gt; &lt;br&gt; For Example i need to get 5th record From userTable then quey will be like this: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style='mso-element:para-border-div;border:solid #DADADA 1.0pt;mso-border-alt: solid #DADADA .75pt;padding:0in 0in 0in 0in;background:#FCFCFC'&gt;&lt;pre style='background:#FCFCFC'&gt;&lt;span style='font-family:"Verdana","sans-serif"'&gt;SELECT TOP 1 * FROM (SELECT TOP 5 * FROM UserTable Order By 1 DESC)AC&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;52) Can we use Truncate command on a table which is referenced by FOREIGN KEY?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;53) What is a table called, if it has no Cluster Index?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;Heap&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;54) How we can get the List of System Tables in DataBase?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;select * from Sys.Objects where Type='s'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;55) How we can generate Random number in SQL Server?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;Select NEWID()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;56) How We can Get List of Store Procedures?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;select * from Sys.Objects where Type='p'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;57) How we can Get List of Triggers?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;select * from Sys.Objects where Type='tr'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;58) Query to Select n Rendom Records From a Table in the Database?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;SELECT TOP 3 * FROM Tbl_REGISTRATION ORDER By NEWID()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;59) Query to Get List of Views?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;select * from information_schema.views&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;61) What is the name of store procedure to send Email using SQL Server 2005/2008?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-bidi-font-family:Arial;color:#333333'&gt;sp_send_dbmail in msdb database can be used to send email using SQL Server 2005/2008&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-bidi-font-family: Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-7639057218188946319?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/7639057218188946319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/sql-server-faqs.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7639057218188946319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7639057218188946319'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/sql-server-faqs.html' title='SQL Server FAQs'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-6101138902920795460</id><published>2010-06-02T06:35:00.001-07:00</published><updated>2010-06-02T07:06:41.101-07:00</updated><title type='text'>SQL Server Basics</title><content type='html'>&lt;div class=Section1&gt;  &lt;div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .75pt;padding:0in 0in 1.0pt 0in'&gt;  &lt;p class=MsoNormal style='border:none;mso-border-bottom-alt:solid windowtext .75pt; padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";color:black'&gt;DBMS vs RDBMS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; color:black'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; color:black'&gt;RDBMS = DBMS + Referential Integrity&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; color:black'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .75pt;padding:0in 0in 1.0pt 0in'&gt;  &lt;p class=MsoNormal style='border:none;mso-border-bottom-alt:solid windowtext .75pt; padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";color:black'&gt;SQLServer 2000 vs SQLServer 2005&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; color:black'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";mso-fareast-font-family: "Trebuchet MS";mso-bidi-font-family:"Trebuchet MS";color:black'&gt;&lt;span style='mso-list:Ignore'&gt;-&lt;span style='font:7.0pt "Times New Roman"'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; color:black'&gt;In SQL Server 2000 the Query Analyzer and Enterprise Manager are seperate,whereas in SQL Server 2005 both were combined as Management Studio. &lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";mso-fareast-font-family: "Trebuchet MS";mso-bidi-font-family:"Trebuchet MS";color:black'&gt;&lt;span style='mso-list:Ignore'&gt;-&lt;span style='font:7.0pt "Times New Roman"'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; color:black'&gt;In Sql 2005,the new datatype XML is used,whereas in Sql 2000 there is no such datatype &lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";mso-fareast-font-family: "Trebuchet MS";mso-bidi-font-family:"Trebuchet MS";color:black'&gt;&lt;span style='mso-list:Ignore'&gt;-&lt;span style='font:7.0pt "Times New Roman"'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; color:black'&gt;The most significant change is the .NET integration with SQL SERVER 2005. Stored procedures, user-defined functions, triggers, aggregates, and user-defined types can now be written using your own favorite .NET language (VB.NET, C#, J# etc.). This support was not there in SQL SERVER 2000 where the only language was T-SQL. In SQL 2005, you have support for two languages T-SQL and .NET.&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span style='font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";mso-fareast-font-family: "Trebuchet MS";mso-bidi-font-family:"Trebuchet MS";color:black'&gt;&lt;span style='mso-list:Ignore'&gt;-&lt;span style='font:7.0pt "Times New Roman"'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; color:black'&gt;SQL SERVER 2005 has reporting services for reports which is a newly added feature and does not exist for SQL SERVER 2000. It was a separate installation for SQL Server 2000&lt;/span&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .75pt;padding:0in 0in 1.0pt 0in'&gt;  &lt;p class=MsoNormal style='border:none;mso-border-bottom-alt:solid windowtext .75pt; padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif"'&gt;Normalization&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;Normalization is the process of efficiently organizing data in a database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;First Normal Form (1NF) - Eliminate duplicative columns from the same table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;Second Normal Form (2NF) - Remove subsets of data that apply to multiple rows of a table and place them in separate tables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;Third Normal Form (3NF) - Remove columns that are not dependent upon the primary key.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;Fourth Normal Form (4NF) - A relation is in 4NF if it has no multi-valued dependencies.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-6101138902920795460?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/6101138902920795460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/sql-server-basics.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/6101138902920795460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/6101138902920795460'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/sql-server-basics.html' title='SQL Server Basics'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-1536602590610670917</id><published>2010-06-02T05:52:00.001-07:00</published><updated>2010-06-02T05:52:53.253-07:00</updated><title type='text'>All about Stored Procedures</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;CREATE PROCEDURE PROC_NAME&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@MYNAME VARCHAR(10),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@YOURNAME VARCHAR(10),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@RESULT1 VARCHAR(10) OUTPUT,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@RESULT2 VARCHAR(10) OUTPUT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;AS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;text-indent: .5in'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;SET NOCOUNT ON;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;INSERT INTO TABLE_NAME(MYNAME,YOURNAME) VALUES(@MYNAME,@YOURNAME);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SET @RESULT1 = @@IDENTITY&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SET @RESULT2=SCOPE_IDENTITY()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;DECLARE @RESULT1 INT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;DELCARE @RESULT2 INT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt'&gt;&lt;span style='font-size:10.0pt;line-height:115%;font-family:"Verdana","sans-serif"'&gt;EXEC PROC_NAME &amp;#8216;ST1&amp;#8217;,&amp;#8217;ST2&amp;#8217;,@RESULT1 OUTPUT,@RESULT2 OUTPUT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-1536602590610670917?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/1536602590610670917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/all-about-stored-procedures.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1536602590610670917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1536602590610670917'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/all-about-stored-procedures.html' title='All about Stored Procedures'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-3798907380545939419</id><published>2010-06-01T05:30:00.001-07:00</published><updated>2010-06-01T05:30:58.991-07:00</updated><title type='text'>Code Access Security</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: 14.4pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;.NET has two kinds of security:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ol style='margin-top:0in' start=1 type=1&gt;  &lt;li class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:      14.4pt;mso-list:l1 level1 lfo1;tab-stops:list .5in'&gt;&lt;b&gt;&lt;span      style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:      "Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;Role Based      Security&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";      mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;      2. &lt;b&gt;Code Access Security&lt;/b&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: 14.4pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;CLR allows code to perform only those operations that the code has permission to perform. So CAS is the CLR's security system that enforces security policies by preventing unauthorized access to protected &lt;b&gt;resources&lt;/b&gt; and &lt;b&gt;operations&lt;/b&gt;. Using the Code Access Security, you can do the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul style='margin-top:0in' type=disc&gt;  &lt;li class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:      14.4pt;mso-list:l0 level1 lfo2;tab-stops:list .5in'&gt;&lt;b&gt;&lt;span      style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:      "Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;Restrict what      your code can do&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";      mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;      &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;  &lt;li class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:      14.4pt;mso-list:l0 level1 lfo2;tab-stops:list .5in'&gt;&lt;b&gt;&lt;span      style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family:      "Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;Restrict which      code can call your code&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;      font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman";      mso-bidi-font-family:"Times New Roman"'&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;  &lt;li class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:      14.4pt;mso-list:l0 level1 lfo2;tab-stops:list .5in'&gt;&lt;b style='mso-bidi-font-weight:      normal'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";      mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;Identify      code&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";      mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: 14.4pt'&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif"; mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;We can create code groups to meet our requirements based on the &lt;b&gt;evidence&lt;/b&gt; provided by .NET Framework. &lt;/span&gt;&lt;span style='font-family:"Courier New"; mso-fareast-font-family:"Times New Roman";color:#990000'&gt;Site&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family: "Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt;, &lt;/span&gt;&lt;span style='font-family:"Courier New";mso-fareast-font-family:"Times New Roman"; color:#990000'&gt;Strong Name&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family: "Verdana","sans-serif";mso-fareast-font-family:"Times New Roman";mso-bidi-font-family: "Times New Roman"'&gt;, &lt;/span&gt;&lt;span style='font-family:"Courier New";mso-fareast-font-family: "Times New Roman";color:#990000'&gt;Zone&lt;/span&gt;&lt;span style='font-size:10.0pt; font-family:"Verdana","sans-serif";mso-fareast-font-family:"Times New Roman"; mso-bidi-font-family:"Times New Roman"'&gt;, &lt;/span&gt;&lt;span style='font-family:"Courier New"; mso-fareast-font-family:"Times New Roman";color:#990000'&gt;URL&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Verdana","sans-serif";mso-fareast-font-family: "Times New Roman";mso-bidi-font-family:"Times New Roman"'&gt; are some of the types of evidence.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-fareast-font-family:"Times New Roman"; mso-no-proof:yes'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-3798907380545939419?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/3798907380545939419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/code-access-security.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3798907380545939419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3798907380545939419'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/code-access-security.html' title='Code Access Security'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-3876846642606771094</id><published>2010-06-01T05:12:00.001-07:00</published><updated>2010-06-01T05:12:35.214-07:00</updated><title type='text'>Yield keyword in C#</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;&lt;b style='mso-bidi-font-weight:normal'&gt;&lt;u&gt;Yield Keyword in .net&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Yield keyword is used to return a value in between the iteration of a loop.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Ex:- &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;public static IEnumerable&amp;lt;int&amp;gt; Square(int min, int max)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;for (int i = min; i &amp;lt;= max; i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;yield return i*i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Now each time this method is called it will return the square of&amp;nbsp;current value within a given range and it&amp;#8217;s also maintains the state&amp;nbsp;between calls.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;foreach (int i in Square(1, 10))&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Response.Write(i.ToString() + &amp;quot; &amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;output will be like 1,4,9,16,25,36,49,64,81,100.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-fareast-font-family:"Times New Roman"; mso-no-proof:yes'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-3876846642606771094?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/3876846642606771094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/yield-keyword-in-c.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3876846642606771094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3876846642606771094'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/06/yield-keyword-in-c.html' title='Yield keyword in C#'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-8672892362364894114</id><published>2010-05-25T04:53:00.001-07:00</published><updated>2010-05-25T04:54:06.314-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Few ADO.NET points for reference'/><title type='text'>Few ADO.NET points for reference</title><content type='html'>&lt;strong&gt;FieldCount&lt;/strong&gt; : is used to get number of colums in a row by using sqldatareader&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;IsClosed &lt;/strong&gt;is used to find whether the sqldatareader is closed or not.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Good Example of stored procedure&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;//Create the Connection Object&lt;br /&gt;SqlConnection ConnectionObject = new SqlConnection(ConnectionString);&lt;br /&gt;//Create the Command Object&lt;br /&gt;SqlCommand CommandObject = new SqlCommand("StoredProcedureName", ConnectionObject);&lt;br /&gt;//Specify to CommandObject that you intend to execute a Stored Procedure&lt;br /&gt;CommandObject.CommandType = CommandType.StoredProcedure;&lt;br /&gt;//Create an SQL Parameter object&lt;br /&gt;SqlParameter ParameterObject = new SqlParameter();&lt;br /&gt;//Specify the name of the SQL Parameter&lt;br /&gt;ParameterObject.ParameterName = "Parameter1";&lt;br /&gt;//Assign the Parameter value&lt;br /&gt;ParameterObject.Value = "Some Value";&lt;br /&gt;//Specify the Database DataType of the Parameter&lt;br /&gt;ParameterObject.DbType = DbType.String;&lt;br /&gt;//Specify the type of parameter - input-only(default), output-only, bidirectional&lt;br /&gt;ParameterObject.Direction = ParameterDirection.Input;&lt;br /&gt;//Associate the Parameter to the Command Object&lt;br /&gt;CommandObject.Parameters.Add(ParameterObject);&lt;br /&gt;//Open the connection&lt;br /&gt;ConnectionObject.Open();&lt;br /&gt;//Execute the command&lt;br /&gt;int Records_Affected = CommandObject.ExecuteNonQuery();&lt;br /&gt;//Close the Connection&lt;br /&gt;ConnectionObject.Close();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Executing and getting data from two queries using datareader&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- By using NextResult() method&lt;br /&gt;- Example&lt;br /&gt;&lt;br /&gt;//Create the SQL Query with 2 Select statements&lt;br /&gt;string SQLQuery = "Select * from Customers;Select * from Employees;";&lt;br /&gt;//Create the Connection Object&lt;br /&gt;SqlConnection ConnectionObject = new SqlConnection(ConnectionString);&lt;br /&gt;//Create the Command Object&lt;br /&gt;SqlCommand CommandObject = new SqlCommand(SQLQuery, ConnectionObject);&lt;br /&gt;//Open the connection&lt;br /&gt;ConnectionObject.Open();&lt;br /&gt;//Execute the command. Now reader object will have 2 tables of data.&lt;br /&gt;SqlDataReader ReaderObject = CommandObject.ExecuteReader();&lt;br /&gt;//Loop thru the tables in the DataReader object&lt;br /&gt;while (ReaderObject.NextResult())&lt;br /&gt;{&lt;br /&gt;while (ReaderObject.Read())&lt;br /&gt;{&lt;br /&gt;//Do Something&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;//Close the Reader&lt;br /&gt;ReaderObject.Close();&lt;br /&gt;//Close the Connection&lt;br /&gt;ConnectionObject.Close();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Uses of using Stored procedures&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1) Better Performance - as they are precompiled one's&lt;br /&gt;2) Security - we can specify who has the rights to execute&lt;br /&gt;3) Reduce Network traffic - Just we need to specify the name of SP instead of sending a big sql query&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Differences between Datareader and Dataset&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;DataReader&lt;br /&gt;1. DatReader works on a Connection oriented architecture.&lt;br /&gt;2. DataReader is read only, forward only. It reads one record at atime. After DataReader finishes reading the current record, it moves to the next record. There is no way you can go back to the previous record. So using a DataReader you read in forward direction only.&lt;br /&gt;3. Updations are not possible with DataReader.&lt;br /&gt;4. As DataReader is read only, forward only it is much faster than a DataSet.&lt;br /&gt;DataSet&lt;br /&gt;1. DataSet works on disconnected architecture.&lt;br /&gt;2. Using a DataSet you can move in both directions. DataSet is bi directional.&lt;br /&gt;3. Database can be updated from a DataSet.&lt;br /&gt;4. DataSet is slower than DataReader.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-8672892362364894114?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/8672892362364894114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/few-adonet-points-for-reference.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8672892362364894114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8672892362364894114'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/few-adonet-points-for-reference.html' title='Few ADO.NET points for reference'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-9112052513703641668</id><published>2010-05-24T04:20:00.000-07:00</published><updated>2010-05-24T04:21:28.189-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='access modifiers in C#'/><title type='text'>Access modifiers in C#</title><content type='html'>Access Modifiers&lt;br /&gt;=================&lt;br /&gt;&lt;br /&gt;Public &lt;br /&gt;can be accessed by any other code in the same assembly or another assembly that references it.&lt;br /&gt;&lt;br /&gt;Private&lt;br /&gt;can only be accessed by code in the same class or struct.&lt;br /&gt;&lt;br /&gt;Protected&lt;br /&gt;can only be accessed by code in the same class or struct, or in a derived class.&lt;br /&gt;&lt;br /&gt;Internal&lt;br /&gt;can be accessed by any code in the same assembly, but not from another assembly.&lt;br /&gt;&lt;br /&gt;Protected Internal &lt;br /&gt;can be accessed by any code in the same assembly, or by any derived class in another assembly.&lt;br /&gt;&lt;br /&gt;Some points&lt;br /&gt;&lt;br /&gt;1) structs members cannot be declared as protected because they doesn't support inheritance.&lt;br /&gt;2) destructors cannot have access modifiers.&lt;br /&gt;3) internal is the default access modifier for class, struct, interface.&lt;br /&gt;4) Interface members are always public.&lt;br /&gt;5) Enumeration members are always public.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-9112052513703641668?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/9112052513703641668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/access-modifiers-in-c.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/9112052513703641668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/9112052513703641668'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/access-modifiers-in-c.html' title='Access modifiers in C#'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-1394724281946534399</id><published>2010-05-24T04:06:00.000-07:00</published><updated>2010-05-24T04:07:49.706-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Indexers in C#'/><title type='text'>Indexers in C#</title><content type='html'>- used to treat an object as an array.&lt;br /&gt;- syntax&lt;br /&gt;&lt;br /&gt;&lt;modifier&gt; &lt;return type&gt; this [argument list] &lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;get &lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;// your get block code &lt;br /&gt;&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;set &lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;// your set block code &lt;br /&gt;&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;- Example&lt;br /&gt;&lt;br /&gt;using System; &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;namespace Indexer_example1 &lt;br /&gt;&lt;br /&gt;{ &lt;br /&gt;&lt;br /&gt;    class Program &lt;br /&gt;&lt;br /&gt;    { &lt;br /&gt;&lt;br /&gt;        class IndexerClass &lt;br /&gt;&lt;br /&gt;        { &lt;br /&gt;&lt;br /&gt;            private string[] names = new string[10]; &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;            public string this[int i] &lt;br /&gt;&lt;br /&gt;            { &lt;br /&gt;&lt;br /&gt;                get &lt;br /&gt;&lt;br /&gt;                { &lt;br /&gt;&lt;br /&gt;                    return names[i]; &lt;br /&gt;&lt;br /&gt;                } &lt;br /&gt;&lt;br /&gt;                set &lt;br /&gt;&lt;br /&gt;                { &lt;br /&gt;&lt;br /&gt;                    names[i] = value; &lt;br /&gt;&lt;br /&gt;                } &lt;br /&gt;&lt;br /&gt;            } &lt;br /&gt;&lt;br /&gt;        } &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;        static void Main(string[] args) &lt;br /&gt;&lt;br /&gt;        { &lt;br /&gt;&lt;br /&gt;            IndexerClass Team = new IndexerClass(); &lt;br /&gt;&lt;br /&gt;            Team[0] = "Rocky"; &lt;br /&gt;&lt;br /&gt;            Team[1] = "Teena"; &lt;br /&gt;&lt;br /&gt;            Team[2] = "Ana"; &lt;br /&gt;&lt;br /&gt;            Team[3] = "Victoria"; &lt;br /&gt;&lt;br /&gt;            Team[4] = "Yani"; &lt;br /&gt;&lt;br /&gt;            Team[5] = "Mary"; &lt;br /&gt;&lt;br /&gt;            Team[6] = "Gomes"; &lt;br /&gt;&lt;br /&gt;            Team[7] = "Arnold"; &lt;br /&gt;&lt;br /&gt;            Team[8] = "Mike"; &lt;br /&gt;&lt;br /&gt;            Team[9] = "Peter"; &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;            for (int i = 0; i &lt; 10; i++) &lt;br /&gt;&lt;br /&gt;            { &lt;br /&gt;&lt;br /&gt;                Console.WriteLine(Team[i]); &lt;br /&gt;&lt;br /&gt;            } &lt;br /&gt;&lt;br /&gt;            Console.ReadKey(); &lt;br /&gt;&lt;br /&gt;        } &lt;br /&gt;&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-1394724281946534399?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/1394724281946534399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/indexers-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1394724281946534399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1394724281946534399'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/indexers-in-c.html' title='Indexers in C#'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-1152786624292714788</id><published>2010-05-24T02:51:00.001-07:00</published><updated>2010-05-24T02:51:58.849-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Constructors in C#'/><title type='text'>FAQ's on Constructors</title><content type='html'>1. Is the Constructor mandatory for the class ?&lt;br /&gt;&lt;br /&gt;Yes, It is mandatory to have the constructor in the class and that too should be accessible for the object i.e., it should have a proper access modifier. Say for example we have the private constructor in the class then it is of no use as it cannot be accessed by the object, so practically it is no available for the object. In such   conditions it will raise an error.&lt;br /&gt;&lt;br /&gt;2. What if I do not write the constructor ?&lt;br /&gt;&lt;br /&gt;In such case the compiler will try to supply the no parameter constructor for your class behind the scene. Compiler will attempt this only if you do not write the constructor for the class. If you provide any constructor ( with or without parameters), then compiler will not make any such attempt.&lt;br /&gt;&lt;br /&gt;3. What if I have the constructor public myDerivedClass() but not the public myBaseClass() ? &lt;br /&gt;&lt;br /&gt;It will raise an error. If either the no parameter constructor is absent or it is in-accessible ( say it is private ), it will raise an error. You will have to take the precaution here.&lt;br /&gt;&lt;br /&gt;4. Can we access static members from the non-static ( normal ) constructors ?&lt;br /&gt;&lt;br /&gt;Yes, We can. There is no such restriction on non-static constructors. But there is one on static constructors that it can access only static members.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-1152786624292714788?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/1152786624292714788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/faqs-on-constructors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1152786624292714788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1152786624292714788'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/faqs-on-constructors.html' title='FAQ&apos;s on Constructors'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-8320727331234852924</id><published>2010-05-12T06:39:00.001-07:00</published><updated>2010-05-12T06:39:24.608-07:00</updated><title type='text'>Windows Workflow Foundation(WWF) basics</title><content type='html'>&lt;div class=Section1&gt;  &lt;div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .75pt;padding:0in 0in 1.0pt 0in'&gt;  &lt;p class=MsoNormal style='border:none;mso-border-bottom-alt:solid windowtext .75pt; padding:0in;mso-padding-alt:0in 0in 1.0pt 0in'&gt;Windows Workflow Foundation(WWF) basics&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;I found good article on WWF here. Very useful&amp;#8230;.Happy Learning&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;http://www.dotnetfunda.com/articles/article155.aspx&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-8320727331234852924?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/8320727331234852924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/windows-workflow-foundationwwf-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8320727331234852924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8320727331234852924'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/windows-workflow-foundationwwf-basics.html' title='Windows Workflow Foundation(WWF) basics'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-3782019973007944134</id><published>2010-05-07T04:51:00.001-07:00</published><updated>2010-05-07T04:51:25.812-07:00</updated><title type='text'>Dotnet Framework Basics</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-fareast-font-family:"Times New Roman"; mso-no-proof:yes'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Microsoft .NET Framework&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;========================&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;.NET Framework = Base class Library(BCL) + CLR&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;CLR - provides Memory management, Thread management, Exception handling, Garbage collection, Security.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;BCL - user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;network communications.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Source Code(C#) -------------&amp;gt; MSIL (or) CIL ----------------------------&amp;gt; Native Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;C# compiler&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CLR using JIT compiler&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Types of JIT compiler&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;---------------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Pre-JIT&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Econo-JIT&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Normal-JIT&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Pre-JIT :- Pre-JIT compiles complete source code into native code in a single compilation cycle. This is done at the time of deployment of the application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Econo-JIT :- Econo-JIT compiles only those methods that are called at runtime.However, these compiled methods are removed when they are not required.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Normal-JIT(default) :- Normal-JIT compiles only those methods that are called at runtime.These methods are compiled the first time they are called, and then they are stored in cache. When the same methods are called again, the compiled code from cache is used for execution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;CTS &amp;amp; CLS&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;----------&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- CLS is a subset of CTS&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Common Type System (CTS) describes how types are declared, used and managed in the runtime and facilitates cross-language integration, type safety, and high performance code execution.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Common Language Specification (CLS) is nothing but guidelines that a language to follow so that it can communicate with other .NET languages in a seamless manner&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Assemblies&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;----------&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- an assembly is a partially compiled code library for use in deployment, versioning and security&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- an assembly is an EXE or DLL&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Private and Shared assemblies&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Private assemblies are stored along with the applicaton folder&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Share assemblies are stored in GAC.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- ILDASM is used to view assembly. It shows manifest and metadata.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Manifest contains version, scope, security, references to resources and classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Metadata is data about data and it contains information about classes, structs, interfaces, namespaces, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- To create strong name sn -k &amp;quot;c:\temp.snk&amp;quot; to uniquely identify the assembly in GAC.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Delay Signing : To avoid showing the strong names to developer during development&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[assembly:AssemblyKeyFileAttribute(&amp;quot;myKey.snk&amp;quot;)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[assembly:AssemblyDelaySignAttribute(true)]&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Ex: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;namespace SURComponents&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style='mso-tab-count:2'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;public class Sample&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style='mso-tab-count:2'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style='mso-tab-count:3'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;public string GetData()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style='mso-tab-count:3'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style='mso-tab-count:2'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;return &amp;quot;hello world&amp;quot;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style='mso-tab-count:3'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style='mso-tab-count:2'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='mso-tab-count:1'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;In the above example SURComponents assembly is created. We can import this assembly and create an object for the class Sample to use the method GetData().&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Garbage Collector&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;-----------------&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Three generations Generation0, Generation1, Generation2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- Gen0 contains all the newly created objects and it is in the top of heap. Gen1 contains all the living objects from Gen0&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;and in the middle of heap. Gen2 contains all the living objects from Gen1 is in the bottom of heap.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;- GC is able to collect the garbage in two ways: full collections (searching the entire managed heap for dead objects) and&lt;span style='mso-spacerun:yes'&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;partial collections (searching only a single generation zone). &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;Access to COM components is provided in the System.Runtime.InteropServices and System.EnterpriseServices namespaces of the framework&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-3782019973007944134?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/3782019973007944134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/dotnet-framework-basics.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3782019973007944134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3782019973007944134'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/05/dotnet-framework-basics.html' title='Dotnet Framework Basics'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-3942456306821016852</id><published>2010-03-10T01:29:00.000-08:00</published><updated>2010-03-10T01:30:40.617-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stored procedures vs functions'/><title type='text'>Difference between stored procedures and functions ?</title><content type='html'>1&gt;Procedure can return zero or n values whereas function can return one value which is mandatory.&lt;br /&gt;&lt;br /&gt;2&gt;Procedures can have input,output parameters for it whereas functions can have only input parameters.&lt;br /&gt;&lt;br /&gt;3&gt;Procedure allow select as well as DML statement in it whereas function allow only select statement in it.&lt;br /&gt;&lt;br /&gt;4&gt;Functions can be called from procedure whereas procedures cannot be called from function.&lt;br /&gt;&lt;br /&gt;5&gt;Exception can be handled by try-catch block in a procedure whereas try-catch block cannot be used in a function.&lt;br /&gt;&lt;br /&gt;6&gt;We can go for transaction management in procedure whereas we can't go in function.&lt;br /&gt;&lt;br /&gt;7&gt;Procedures can not be utilized in a select statement whereas function can be embedded in a select statement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-3942456306821016852?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/3942456306821016852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/03/difference-between-stored-procedures.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3942456306821016852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3942456306821016852'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/03/difference-between-stored-procedures.html' title='Difference between stored procedures and functions ?'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-8336692391168332188</id><published>2010-03-09T19:51:00.001-08:00</published><updated>2010-03-09T19:51:59.956-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='COM Basics'/><title type='text'>COM Basics - Important Points</title><content type='html'>COM&lt;br /&gt;===&lt;br /&gt;&lt;br /&gt;IUNKNOWN &lt;br /&gt;&lt;br /&gt;1)Base interface of COM. Every interface directly or indirectly derived from this interface&lt;br /&gt;2)Provides three methods AddRef, QueryInterface, Release&lt;br /&gt;3)AddRef increments the reference count to the object&lt;br /&gt;4)Release decrements the reference count to the object&lt;br /&gt;5)QueryInterface obtains Pointer to the object.&lt;br /&gt;6)QueryInterface returns E_NOINTERFACE if requested object was not found and also nullify its out parameter.&lt;br /&gt;&lt;br /&gt;IDISPOSE&lt;br /&gt;&lt;br /&gt;1)exposes objects, methods and properties to programming tools and other applications that support Automation.&lt;br /&gt;2)The object's properties and methods can be accessed using IDispatch::GetIDsOfNames and IDispatch::Invoke.&lt;br /&gt;&lt;br /&gt;CoCreateInstance and CoCreateInstanceEX&lt;br /&gt;&lt;br /&gt;1)CocreateInstance is used to create object in local system and it allows only one object to create at a time.&lt;br /&gt;2)CoCreateInstanceEx is used to create object in remote system and it allows to create multiple objects based on single CLSID&lt;br /&gt;&lt;br /&gt;Aggregation&lt;br /&gt;&lt;br /&gt;1)Is the mechanism in which outerobject exposes the methods of inner object&lt;br /&gt;2)We can get a pointer to the inner interface, calling QueryInterface of the outer object with IID of the inner interface.&lt;br /&gt;&lt;br /&gt;Moniker&lt;br /&gt;&lt;br /&gt;1)An object that implements IMoniker interface.&lt;br /&gt;2)provides information to uniquely identify a COM object.&lt;br /&gt;&lt;br /&gt;OLE vs COM&lt;br /&gt;&lt;br /&gt;1)OLE is build on top of COM&lt;br /&gt;2)COM is a specification, while OLE is a particular implementation of this specification&lt;br /&gt;&lt;br /&gt;COM vs DCOM&lt;br /&gt;&lt;br /&gt;1)introduced several improvements for distributed environment, such as MULTI_QI (multiple QueryInterface()), security &lt;br /&gt;&lt;br /&gt;contexts&lt;br /&gt;2)DCOM demonstrated importance of surrogate process (you cannot run in-proc server on a remote machine).&lt;br /&gt;3)DCOM introduced a load balancing&lt;br /&gt;4)DCOM extends COM&lt;br /&gt;&lt;br /&gt;Dual Interface&lt;br /&gt;&lt;br /&gt;1) which supports both IDISPATCH and V-Table based interfaces&lt;br /&gt;2)You may have two dual interfaces in one class. you cannot work with two dual interfaces at the same time.&lt;br /&gt;&lt;br /&gt;Marshalling By Value&lt;br /&gt;&lt;br /&gt;1) Instead of accessing an object remotely, it is possible to copy the static state of the object and create a new object with the same state information on the caller side. &lt;br /&gt;2) not involve network round trips.&lt;br /&gt;&lt;br /&gt;multi-threaded apartment (MTA) and Single-threaded apartment (STA)&lt;br /&gt;&lt;br /&gt;1) In STA, all calls will be made by the same thread. In MTA, COM object can be accessed by many threads simultaneously&lt;br /&gt;2) A process can have only one MTA, but many STAs&lt;br /&gt;&lt;br /&gt;In-Proc means COM object that implemented as DLL and supposed to be hosted by a container. When you have to instantiate the in-proc object remotely, you may use DLLHost.exe application that was design specially for this purpose. &lt;br /&gt;&lt;br /&gt;IDL&lt;br /&gt;&lt;br /&gt;Interface Definition Language to describe COM interfaces&lt;br /&gt;&lt;br /&gt;Is there a way to register in-proc server without regsvr32.exe? &lt;br /&gt;&lt;br /&gt;Yes. Call DllRegisterServer() from the client. Do not forget to call DLLUnregisterServer() from the same client. You may also use Registrar object for the same purpose or use direct manipulation of the windows registry.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-8336692391168332188?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/8336692391168332188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/03/com-basics-important-points.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8336692391168332188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8336692391168332188'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/03/com-basics-important-points.html' title='COM Basics - Important Points'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-6691390897617834998</id><published>2010-03-09T06:28:00.000-08:00</published><updated>2010-03-09T06:29:32.104-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Classic ASP Basics - 1'/><title type='text'>Classic ASP Basics - 1</title><content type='html'>global.asa&lt;br /&gt;==========&lt;br /&gt;&lt;br /&gt;application events&lt;br /&gt;session events&lt;br /&gt;object declarations&lt;br /&gt;TypeLibrary declarations&lt;br /&gt;#include directive&lt;br /&gt;&lt;br /&gt;======================&lt;br /&gt;&lt;br /&gt;&lt;object runat="server" scope="session" id="MyAd" progid="MSWC.AdRotator"&gt;&lt;br /&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;You could reference the object "MyAd" from any page in the ASP application:&lt;br /&gt;&lt;br /&gt;&lt;%=MyAd.GetAdvertisement("/banners/adrot.txt")%&gt;&lt;br /&gt;&lt;br /&gt;========================&lt;br /&gt;&lt;br /&gt;Calling stored procedure from ADO&lt;br /&gt;=================================&lt;br /&gt;&lt;br /&gt;Set cn = Server.CreateObject("ADODB.Connection")&lt;br /&gt;Set cmd = Server.CreateObject("ADODB.Command")&lt;br /&gt;cn.Open "data source name", "userid", "password"&lt;br /&gt;Set cmd.ActiveConnection = cn&lt;br /&gt;cmd.CommandText = "sp_test"&lt;br /&gt;cmd.CommandType = adCmdStoredProc&lt;br /&gt;' Ask the server about the parameters for the stored proc&lt;br /&gt;cmd.Parameters.Refresh&lt;br /&gt;' Assign a value to the 2nd parameter.&lt;br /&gt;' Index of 0 represents first parameter.&lt;br /&gt;cmd.Parameters(1) = 11&lt;br /&gt;cmd.Execute&lt;br /&gt;%&gt;&lt;br /&gt;Calling via method 1&lt;BR&gt;&lt;br /&gt;ReturnValue = &lt;% Response.Write cmd.Parameters(0) %&gt;&lt;br /&gt;&lt;br /&gt;Cursors types in ADO&lt;br /&gt;====================&lt;br /&gt;&lt;br /&gt;1) adOpenDynamic :- Additions, Changes and Deletions by other users will be visible&lt;br /&gt;2) adOpenKeyset :- Only changes will be visible. Additions and Deletions are not visible.&lt;br /&gt;3) adOpenStatic :- Additions, Changes and Deletions by other users are not visible. Used for disconnected recordset model.&lt;br /&gt;4) adOpenForward-only :- Additions, Changes and Deletions by other users are not visible. To only scroll forward only.&lt;br /&gt;&lt;br /&gt;Cursor Locations in ADO&lt;br /&gt;=======================&lt;br /&gt;&lt;br /&gt;adUseNone &lt;br /&gt;adUseServer&lt;br /&gt;adUseClient (read only)&lt;br /&gt;adUseClientBatch&lt;br /&gt;&lt;br /&gt;Cursor Lock types in ADO&lt;br /&gt;=======================&lt;br /&gt;&lt;br /&gt;adLockPessimistic - Locks the row once after any edits occur.&lt;br /&gt;adLockOptimistic - Locks the row only when Update is called.&lt;br /&gt;adLockBatchOptimistic - Allows Batch Updates.&lt;br /&gt;adLockReadOnly - Read only. Cannot alter the data.&lt;br /&gt;&lt;br /&gt;Disconnected Recordset&lt;br /&gt;=======================&lt;br /&gt;&lt;br /&gt;set con= server.createobject("ADODB.Connection")&lt;br /&gt;set rs= server.createobject("ADODB.Recordset")&lt;br /&gt;rs.CursorLocation=adUseClient&lt;br /&gt;con.open sqlcon&lt;br /&gt;rs.open sqlqry, con, adOpenStatic, adLockBatchOptimistic&lt;br /&gt;Set oRS.ActiveConnection = Nothing&lt;br /&gt;Set GetanotherRS = oRS&lt;br /&gt;&lt;br /&gt;Clustered and nonclustered indexes&lt;br /&gt;=================================&lt;br /&gt;&lt;br /&gt;Clustered indexes contains actual data at leaf nodes&lt;br /&gt;non clustered indexes contains row locators that point to actual data. 249 -&gt; 999&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-6691390897617834998?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/6691390897617834998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/03/classic-asp-basics-1.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/6691390897617834998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/6691390897617834998'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/03/classic-asp-basics-1.html' title='Classic ASP Basics - 1'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-1677611107472169777</id><published>2010-02-26T06:45:00.000-08:00</published><updated>2010-02-26T06:47:43.754-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Changing color of a cell in datagrid and gridview contros in asp.net'/><title type='text'>Changing color of a cell in datagrid and gridview contros in asp.net</title><content type='html'>In RowDataBound event of GridView&lt;br /&gt;&lt;br /&gt;protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e)&lt;br /&gt;    {&lt;br /&gt;        if (e.Row.RowType == DataControlRowType.DataRow)&lt;br /&gt;        {&lt;br /&gt;            e.Row.Cells[0].BackColor = System.Drawing.Color.Gray;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;In OnItemDataBound event of DataGrid&lt;br /&gt;&lt;br /&gt;protected void ItemDB(object sender, DataGridItemEventArgs e) &lt;br /&gt;{ &lt;br /&gt; &lt;br /&gt;  if (Convert.ToInt16 (e.Item.Cells[6].Text) &gt;15 ) &lt;br /&gt;          { &lt;br /&gt;          e.Item.Cells[6].ForeColor = System.Drawing.Color.Green; &lt;br /&gt;           } &lt;br /&gt;      else &lt;br /&gt;           { &lt;br /&gt;           e.Item.Cells[6].ForeColor = System.Drawing.Color.Red; &lt;br /&gt;           } &lt;br /&gt;      } &lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-1677611107472169777?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/1677611107472169777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/changing-color-of-cell-in-datagrid-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1677611107472169777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1677611107472169777'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/changing-color-of-cell-in-datagrid-and.html' title='Changing color of a cell in datagrid and gridview contros in asp.net'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-4370606485801689040</id><published>2010-02-26T05:47:00.000-08:00</published><updated>2010-02-26T05:52:04.140-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AJAX basics'/><title type='text'>AJAX Basics</title><content type='html'>for Other browsers except IE&lt;br /&gt;&lt;br /&gt;objXmlHttp=new XMLHttpRequest();&lt;br /&gt;&lt;br /&gt;for &gt; IE 6.0 &lt;br /&gt;&lt;br /&gt;objXmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); &lt;br /&gt;&lt;br /&gt;others&lt;br /&gt;&lt;br /&gt;objXmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); &lt;br /&gt;&lt;br /&gt;0 The request is not initialized &lt;br /&gt;1 The request has been set up &lt;br /&gt;2 The request has been sent &lt;br /&gt;3 The request is in process &lt;br /&gt;4 The request is complete &lt;br /&gt;&lt;br /&gt;xmlhttp.onreadystatechange=function_name&lt;br /&gt;xmlhttp.open("GET",url,true);&lt;br /&gt;xmlhttp.send(null);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-4370606485801689040?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/4370606485801689040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/ajax-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/4370606485801689040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/4370606485801689040'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/ajax-basics.html' title='AJAX Basics'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-5013536203383732993</id><published>2010-02-17T02:51:00.000-08:00</published><updated>2010-02-26T06:14:10.433-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Authentication and Authorization'/><title type='text'>Authentication and Authorization in asp.net</title><content type='html'>&lt;strong&gt;authentication&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; 1)windows authentication&lt;br /&gt;    -anonymous&lt;br /&gt;    -basic&lt;br /&gt;    -digest&lt;br /&gt;    -integrated windows &lt;br /&gt; 2)forms authentication&lt;br /&gt; 3)passport authentication&lt;br /&gt; 4)none&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;authorization&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt; file authorization depends on NTFS permissions&lt;br /&gt; url authorization  depends on &lt;authroization&gt; tag in web.config&lt;br /&gt;&lt;br /&gt;forms authentication uses HTML forms to collect authentication information and check in databases. In forms tag &lt;br /&gt;name="frmauth" loginURL="login.aspx" protection="all"&lt;br /&gt;&lt;br /&gt;authorization&lt;br /&gt;allow users="*/?"&lt;br /&gt;deny users="*/?"&lt;br /&gt;authorization&lt;br /&gt;&lt;br /&gt;authentication mode="Forms"&lt;br /&gt;     forms loginUrl="Login.aspx" protection="All"&lt;br /&gt;          credentials passwordFormat="Clear" &lt;br /&gt;             user name="Admin" password="Admin"&lt;br /&gt;               user name="Super" password="Super"&lt;br /&gt;               user name="User" password="User" &lt;br /&gt;          credentials &lt;br /&gt;     forms &lt;br /&gt;authentication&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;impersonation : by default not enabled&lt;br /&gt;  by default asp.net application runs under "aspnet" account. to run under specific user credentials     require impersonation.&lt;br /&gt;&lt;br /&gt;Anonymous Authentication: IIS doesn't perform any authentication check. IIS allows any user to access the ASP .NET application. &lt;br /&gt;&lt;br /&gt;Basic Authentication: For this kind of authentication, a Windows user name and password have to be provided to connect. However, this information is sent over the network in plain text and hence this is an insecure kind of authentication. Basic Authentication is the only mode of authentication older, non-Internet Explorer browsers support. &lt;br /&gt;&lt;br /&gt;Digest Authentication: It is same as Basic Authentication but for the fact that the password is hashed before it is sent across the network. However, to be using Digest Authentication, we must use IE 5.0 or above.&lt;br /&gt; &lt;br /&gt;Integrated Windows Authentication: In this kind of authentication technique, passwords are not sent across the network. The application here uses either the kerberos or challenge/response protocols to authenticate users. Kerberos, a network authentication protocol, is designed to provide strong authentication for client-server applications. It provides the tools of authentication and strong cryptography over the network to help to secure information in systems across entire enterprise.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-5013536203383732993?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/5013536203383732993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/authentication-and-authorization-in.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/5013536203383732993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/5013536203383732993'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/authentication-and-authorization-in.html' title='Authentication and Authorization in asp.net'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-1917175049664807210</id><published>2010-02-17T02:50:00.001-08:00</published><updated>2010-02-17T02:50:48.944-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='experienced people in dotnet'/><title type='text'>Dotnet questions for experienced people</title><content type='html'>1. From constructor to destructor (taking into consideration Dispose() and the concept of non-deterministic finalization), what the are events fired as part of the ASP.NET System.Web.UI.Page lifecycle. Why are they important? What interesting things can you do at each?&lt;br /&gt;2. What are ASHX files? What are HttpHandlers? Where can they be configured?&lt;br /&gt;3. What is needed to configure a new extension for use in ASP.NET? For example, what if I wanted my system to serve ASPX files with a *.jsp extension?&lt;br /&gt;4. What events fire when binding data to a data grid? What are they good for?&lt;br /&gt;5. Explain how PostBacks work, on both the client-side and server-side. How do I chain my own JavaScript into the client side without losing PostBack functionality?&lt;br /&gt;6. How does ViewState work and why is it either useful or evil?&lt;br /&gt;7. What is the OO relationship between an ASPX page and its CS/VB code behind file in ASP.NET 1.1? in 2.0?&lt;br /&gt;8. What happens from the point an HTTP request is received on a TCP/IP port up until the Page fires the On_Load event?&lt;br /&gt;9. How does IIS communicate at runtime with ASP.NET? Where is ASP.NET at runtime in IIS5? IIS6?&lt;br /&gt;10. What is an assembly binding redirect? Where are the places an administrator or developer can affect how assembly binding policy is applied?&lt;br /&gt;11. Compare and contrast LoadLibrary(), CoCreateInstance(), CreateObject() and Assembly.Load().&lt;br /&gt;12. Describe the difference between a Thread and a Process?&lt;br /&gt;13. What is a Windows Service and how does its lifecycle differ from a “standard” EXE?&lt;br /&gt;14. What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?&lt;br /&gt;15. What is the difference between an EXE and a DLL?&lt;br /&gt;16. What is strong-typing versus weak-typing? Which is preferred? Why?&lt;br /&gt;17. What’s wrong with a line like this? DateTime.Parse(myString&lt;br /&gt;18. What are PDBs? Where must they be located for debugging to work?&lt;br /&gt;19. What is cyclomatic complexity and why is it important?&lt;br /&gt;20. Write a standard lock() plus double check to create a critical section around a variable access.&lt;br /&gt;21. What is FullTrust? Do GAC’ed assemblies have FullTrust?&lt;br /&gt;22. What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?&lt;br /&gt;23. What does this do? gacutil /l find /i “about”&lt;br /&gt;24. What does this do? sn -t foo.dll&lt;br /&gt;25. What ports must be open for DCOM over a firewall? What is the purpose of Port 135?&lt;br /&gt;26. Contrast OOP and SOA. What are tenets of each&lt;br /&gt;27. How does the XmlSerializer work? What ACL permissions does a process using it require?&lt;br /&gt;28. Why is catch(Exception) almost always a bad idea?&lt;br /&gt;29. What is the difference between Debug.Write and Trace.Write? When should each be used?&lt;br /&gt;30. What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?&lt;br /&gt;31. Does JITting occur per-assembly or per-method? How does this affect the working set?&lt;br /&gt;32. Contrast the use of an abstract base class against an interface?&lt;br /&gt;33. What is the difference between a.Equals(b) and a == b?&lt;br /&gt;34. In the context of a comparison, what is object identity versus object equivalence?&lt;br /&gt;35. How would one do a deep copy in .NET?&lt;br /&gt;36. Explain current thinking around IClonable.&lt;br /&gt;37. What is boxing?&lt;br /&gt;38. Is string a value type or a reference type?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-1917175049664807210?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/1917175049664807210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/dotnet-questions-for-experienced-people.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1917175049664807210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1917175049664807210'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/dotnet-questions-for-experienced-people.html' title='Dotnet questions for experienced people'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-82208563844381452</id><published>2010-02-17T02:48:00.000-08:00</published><updated>2010-02-19T19:35:47.567-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview questions in dotnet'/><title type='text'>Dotnet interview questions - FAQ's</title><content type='html'>1. What is CLR, CTS, CLS? &lt;br /&gt;2. What is MSIL , IL ? &lt;br /&gt;3. What are the new features of Framework 1.1? &lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.s2d6.com/x/?x=i&amp;amp;z=i&amp;amp;v=2632723&amp;amp;r=[RANDOM]&amp;amp;k=[NETWORKID]" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" width="730" height="300"&gt;&lt;br /&gt; &lt;ilayer src="http://www.s2d6.com/x/?x=i&amp;amp;z=i&amp;amp;v=2632723&amp;amp;r=[RANDOM]&amp;amp;k=[NETWORKID]" z-index="0" width="730" height="300"&gt;&lt;br /&gt;&lt;a href="http://www.s2d6.com/x/?x=c&amp;amp;z=s&amp;amp;v=2632723&amp;amp;r=[RANDOM]&amp;amp;k=[NETWORKID]" target="_blank"&gt;&lt;br /&gt;&lt;img src="http://www.s2d6.com/x/?x=i&amp;amp;z=s&amp;amp;v=2632723&amp;amp;r=[RANDOM]&amp;amp;k=[NETWORKID]" border="0" alt="click here" /&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/ilayer&gt;&lt;br /&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Assembly &lt;br /&gt;&lt;br /&gt;4. What is Assembly?&lt;br /&gt;5. What are the contents of assembly?&lt;br /&gt;6. What are the different types of assemblies?&lt;br /&gt;7. What is the difference between a private assembly and a shared assembly? &lt;br /&gt;8. What are Satellite Assemblies? How you will create this? How will you get the different language strings? &lt;br /&gt;9. How will u load dynamic assembly? How will create assemblies at run time?&lt;br /&gt;10. What is Assembly manifest? what all details the assembly manifest will contain? &lt;br /&gt;11. Difference between assembly manifest &amp; metadata?&lt;br /&gt;12. What is Global Assembly Cache (GAC) and what is the purpose of it? (How to make an assembly to public? Steps) How more than one version of an assembly can keep in same place?&lt;br /&gt;13. Advantage of ADO.Net? &lt;br /&gt;14. How would u connect to database using .NET? &lt;br /&gt;15. What are relation objects in dataset and how &amp; where to use them?&lt;br /&gt;16. Difference between OLEDB Provider and SqlClient ? &lt;br /&gt;17. What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database? &lt;br /&gt;18. Difference between DataReader and DataAdapter / DataSet and DataAdapter?&lt;br /&gt;19. Which method do you invoke on the DataAdapter control to load your generated dataset with data? &lt;br /&gt;20. Explain different methods and Properties of DataReader which you have used in your project? &lt;br /&gt;21. What happens when we issue Dataset.ReadXml command?&lt;br /&gt;22. In how many ways we can retrieve table records count? How to find the count of records in a dataset?&lt;br /&gt;23. How to check if a datareader is closed or opened?IsClosed() &lt;br /&gt;24. What happens when u try to update data in a dataset in .NET while the record is already deleted in SQL SERVER as backend?&lt;br /&gt;OR What is concurrency? How will you avoid concurrency when dealing with dataset? (One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid the problem?)&lt;br /&gt;25. How do you merge 2 datasets into the third dataset in a simple manner? OR If you are executing these statements in commandObject. "Select * from Table1;Select * from Table2” &lt;br /&gt;26. how you will deal result set? How do you sort a dataset?If a dataset contains 100 rows, how to fetch rows between 5 and 15 only? &lt;br /&gt;27. Differences between dataset.clone and dataset.copy?&lt;br /&gt;28. What is the use of parameter object? &lt;br /&gt;29. How do u implement locking concept for dataset?&lt;br /&gt;30. How to generate XML from a dataset and vice versa?&lt;br /&gt;31. What is method to get XML and schema from Dataset? getXML() and get Schema () &lt;br /&gt;32. If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application? &lt;br /&gt;33. How to find methods of a assembly file (not using ILDASM) &lt;br /&gt;34. What is Garbage Collection in .Net? Garbage collection process? &lt;br /&gt;35. What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly? &lt;br /&gt;36. What is Custom attribute? How to create? If I'm having custom attribute in an assembly, how to say that name in the code? &lt;br /&gt;37. How Garbage Collector (GC) Works?&lt;br /&gt;&lt;br /&gt;38. Why do we need to call CG.SupressFinalize? &lt;br /&gt;39. What is nmake tool?&lt;br /&gt;40. What are Namespaces?&lt;br /&gt;41. What is JIT (just in time)? how it works? &lt;br /&gt;42. What is strong name? &lt;br /&gt;43. What is portable executable (PE)? &lt;br /&gt;44. What is Event - Delegate? clear syntax for writing a event delegate&lt;br /&gt;45. Which namespace is the base class for .net Class library? &lt;br /&gt;46. What are object pooling and connection pooling and difference? Where do we set the Min and Max Pool size for connection pooling?&lt;br /&gt;47. What is exception handling? &lt;br /&gt;48. What is the managed and unmanaged code in .net?&lt;br /&gt;49. How do you create threading in .NET? What is the namespace for that? &lt;br /&gt;50. Serialize and MarshalByRef? &lt;br /&gt;51. using directive vs using statement &lt;br /&gt;52. Describe the Managed Execution Process? &lt;br /&gt;53. What is Active Directory? What is the namespace used to access the Microsoft Active Directories? What are ADSI Directories? &lt;br /&gt;54. What is the difference between CONST and READONLY?&lt;br /&gt;55. What is the difference between ref &amp; out parameters?&lt;br /&gt;56. What is the difference between Array and LinkedList? &lt;br /&gt;57. What is the difference between Array and Arraylist? &lt;br /&gt;58. What is Jagged Arrays? &lt;br /&gt;59. What are indexers? &lt;br /&gt;60. What is Asynchronous call and how it can be implemented using delegates? &lt;br /&gt;61. How to create events for a control? What is custom events? How to create it? &lt;br /&gt;62. If you want to write your own dot net language, what steps you will u take care? &lt;br /&gt;63. Describe the difference between inline and code behind - which is best in a loosely coupled solution? &lt;br /&gt;64. how dot net compiled code will become platform independent? &lt;br /&gt;65. without modifying source code if we compile again, will it be generated MSIL again? &lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://www.s2d6.com/x/?x=i&amp;amp;z=i&amp;amp;v=2632729&amp;amp;r=[RANDOM]&amp;amp;k=[NETWORKID]" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" width="675" height="400"&gt;&lt;br /&gt; &lt;ilayer src="http://www.s2d6.com/x/?x=i&amp;amp;z=i&amp;amp;v=2632729&amp;amp;r=[RANDOM]&amp;amp;k=[NETWORKID]" z-index="0" width="675" height="400"&gt;&lt;br /&gt;&lt;a href="http://www.s2d6.com/x/?x=c&amp;amp;z=s&amp;amp;v=2632729&amp;amp;r=[RANDOM]&amp;amp;k=[NETWORKID]" target="_blank"&gt;&lt;br /&gt;&lt;img src="http://www.s2d6.com/x/?x=i&amp;amp;z=s&amp;amp;v=2632729&amp;amp;r=[RANDOM]&amp;amp;k=[NETWORKID]" border="0" alt="click here" /&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/ilayer&gt;&lt;br /&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;(COM) &lt;br /&gt;&lt;br /&gt;66. Interop Services?&lt;br /&gt;67. How does u handle this COM components developed in other programming languages in .NET? &lt;br /&gt;68. What is RCW (Runtime Callable Wrappers)? &lt;br /&gt;69. What is CCW (COM Callable Wrapper) &lt;br /&gt;70. How CCW and RCW is working?&lt;br /&gt;71. How will you register com+ services? &lt;br /&gt;72. What is use of ContextUtil class? &lt;br /&gt;73. What is the new three features of COM+ services, which are not there in COM (MTS)?&lt;br /&gt;74. Is the COM architecture same as .Net architecture? What is the difference between them?&lt;br /&gt;75. Can we copy a COM dll to GAC folder?&lt;br /&gt;76. What is Pinvoke? &lt;br /&gt;77. Is it true that COM objects no longer need to be registered on the server? &lt;br /&gt;78. Can .NET Framework components use the features of Component Services?&lt;br /&gt;&lt;br /&gt;(OOPS) &lt;br /&gt;&lt;br /&gt;79. What are the OOPS concepts? &lt;br /&gt;80. What is the difference between a Struct and a Class? &lt;br /&gt;81. Value type &amp; reference types difference? Example from .NET. Integer &amp; struct are value types or reference types in .NET?&lt;br /&gt;&lt;br /&gt;82. What is Inheritance, Multiple Inheritance, Shared and Repeatable Inheritance?&lt;br /&gt;83. What is Method overloading?&lt;br /&gt;84. What is Method Overriding? How to override a function in C#? &lt;br /&gt;85. Can we call a base class method without creating instance?&lt;br /&gt;86. You have one base class virtual function how will call that function from derived class?&lt;br /&gt;87. In which cases you use override and new base?&lt;br /&gt;&lt;br /&gt;C# Language features &lt;br /&gt;&lt;br /&gt;88. What are Sealed Classes in C#?&lt;br /&gt;89. What is Polymorphism? How does VB.NET/C# achieve polymorphism?&lt;br /&gt;90. In which Scenario you will go for Interface or Abstract Class?&lt;br /&gt;&lt;br /&gt;91. Write one code example for compile time binding and one for run time binding? What is early/late binding? &lt;br /&gt;92. Can you explain what inheritance is and an example of when you might use it? &lt;br /&gt;93. How can you write a class to restrict that only one object of this class can be created (Singleton class)? &lt;br /&gt;&lt;br /&gt;(Access specifiers) &lt;br /&gt;&lt;br /&gt;94. What are the access-specifiers available in c#? &lt;br /&gt;95. Explain about Protected and protected internal, “internal” access-specifier?&lt;br /&gt;&lt;br /&gt;(Constructor / Destructor) &lt;br /&gt;&lt;br /&gt;96. Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use? &lt;br /&gt;97. What is Private Constructor? and it’s use? Can you create instance of a class which has Private Constructor? &lt;br /&gt;98. I have 3 overloaded constructors in my class. In order to avoid making instance of the class do I need to make all constructors to private?&lt;br /&gt;99. Overloaded constructor will call default constructor internally?&lt;br /&gt;100. What are virtual destructors? &lt;br /&gt;101. Destructor and finalize &lt;br /&gt;102. What is the difference between Finalize and Dispose (Garbage collection) &lt;br /&gt;103. What is close method? How its different from Finalize &amp; Dispose?&lt;br /&gt;104. What is boxing &amp; unboxing? &lt;br /&gt;105. What is check/uncheck? &lt;br /&gt;106. What is the use of base keyword? Tell me a practical example for base keyword’s usage? &lt;br /&gt;107. What are the different .net tools which u used in projects? &lt;br /&gt;108. Is goto statement supported in C#? How about Java? &lt;br /&gt;109. What’s different about switch statements in C#? &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(ASP.NET) &lt;br /&gt;&lt;br /&gt;110. Asp.net and asp – differences? &lt;br /&gt;111. How ASP and ASP.NET page works? Explain about asp.net page life cycle?&lt;br /&gt;112. Order of events in an asp.net page? Control Execution Lifecycle? &lt;br /&gt;113. What are server controls? &lt;br /&gt;114. What is the difference between Web User Control and Web Custom Control?&lt;br /&gt;&lt;br /&gt;(Session/State) &lt;br /&gt;&lt;br /&gt;115. Application and Session Events&lt;br /&gt;116. Difference between ASP Session and ASP.NET Session? &lt;br /&gt;117. What is cookie less session? How it works? &lt;br /&gt;118. How you will handle session when deploying application in more than a server? &lt;br /&gt;119. Describe session handling in a webfarm, how does it work and what are the limits?&lt;br /&gt;120. What method do you use to explicitly kill a users session? &lt;br /&gt;121. What are the different ways you would consider sending data across pages in ASP (i.e between 1.asp to 2.asp)? &lt;br /&gt;122. What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?&lt;br /&gt;123. What are the disadvantages of view state / what are the benefits? &lt;br /&gt;124. When maintaining session through Sql server, what is the impact of Read and Write operation on Session objects? will performance degrade?&lt;br /&gt;125. What are the contents of cookie?&lt;br /&gt;126. How do you create a permanent cookie&lt;br /&gt;127. What is ViewState? What does the "EnableViewState" property do? Why would I want it on or off?&lt;br /&gt;128. Explain the differences between Server-side and Client-side code? &lt;br /&gt;129. Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?&lt;br /&gt;130. Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?&lt;br /&gt;131. Briefly describe the role of global.asax? &lt;br /&gt;132. How can u debug your .net application? &lt;br /&gt;133. How do u deploy your asp.net application? &lt;br /&gt;134. Where do we store our connection string in asp.net application? &lt;br /&gt;135. Various steps taken to optimize a web based application (caching, stored procedure etc.) &lt;br /&gt;136. How does ASP.NET framework maps client side events to Server side events.&lt;br /&gt;&lt;br /&gt;(Security) &lt;br /&gt;&lt;br /&gt;138. Security types in ASP/ASP.NET? Different Authentication modes? &lt;br /&gt;139. How .Net has implemented security for web applications? &lt;br /&gt;140. How to do Forms authentication in asp.net? &lt;br /&gt;141. Explain authentication levels in .net ? &lt;br /&gt;142. Explain autherization levels in .net ? &lt;br /&gt;143. What is Role-Based security?&lt;br /&gt;144. How will you do windows authentication and what is the namespace? If a user is logged under integrated windows authentication mode, but he is still not able to logon, what might be the possible cause for this? In ASP.Net application how do you find the name of the logged in person under windows authentication? &lt;br /&gt;145. What are the different authentication modes in the .NET environment?&lt;br /&gt;146. How do you specify whether your data should be passed as Query string and Forms (Mainly about POST and GET) &lt;br /&gt;147. What is the other method, other than GET and POST, in ASP.NET? &lt;br /&gt;148. What are validator? Name the Validation controls in asp.net? How do u disable them? Will the asp.net validators run in server side or client side? How do you do Client-side validation in .Net? How to disable validator control by client side JavaScript?&lt;br /&gt;149. Which two properties are there on every validation control?&lt;br /&gt;&lt;br /&gt;150. How do you use css in asp.net? &lt;br /&gt;151. How do you implement postback with a text box? What is postback and usestate? &lt;br /&gt;152. How can you debug an ASP page, without touching the code? &lt;br /&gt;153. What is SQL injection?&lt;br /&gt;154. How can u handle Exceptions in Asp.Net? &lt;br /&gt;155. How can u handle Un Managed Code Exceptions in ASP.Net? &lt;br /&gt;156. Asp.net - How to find last error which occurred?&lt;br /&gt;157. How to do Caching in ASP?&lt;br /&gt;158. What is the Global ASA(X) File? &lt;br /&gt;159. Any alternative to avoid name collisions other then Namespaces.&lt;br /&gt;160. Which is the namespace used to write error message in event Log File? &lt;br /&gt;161. What are the page level transaction and class level transaction? &lt;br /&gt;162. What are different transaction options? &lt;br /&gt;163. What is the namespace for encryption? &lt;br /&gt;164. What is the difference between application and cache variables? &lt;br /&gt;165. What is the difference between control and component? &lt;br /&gt;166. You ve defined one page_load event in aspx page and same page_load event in code behind how will prog run? &lt;br /&gt;167. Where would you use an IHttpModule, and what are the limitations of any approach you might take in implementing one? &lt;br /&gt;168. Can you edit data in the Repeater control? Which template must you provide, in order to display data in a Repeater control? How can you provide an alternating color scheme in a Repeater control? What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control? &lt;br /&gt;169. What is the use of web.config? Difference between machine.config and Web.config? &lt;br /&gt;170. What is the use of sessionstate tag in the web.config file? &lt;br /&gt;171. What are the different modes for the sessionstates in the web.config file? &lt;br /&gt;172. What is smart navigation? &lt;br /&gt;173. In what order do the events of an ASPX page execute. As a developer is it important to undertsand these events? &lt;br /&gt;174. How would you get ASP.NET running in Apache web servers - why would you even do this? &lt;br /&gt;175. What tags do you need to add within the asp:datagrid tags to bind columns manually &lt;br /&gt;176. What base class do all Web Forms inherit from? &lt;br /&gt;177. How can we create pie chart in asp.net? &lt;br /&gt;178. Is it possible for me to change my aspx file extension to some other name?&lt;br /&gt;179. What is AutoEventWireup attribute for ?&lt;br /&gt;&lt;br /&gt;(WEBSERVICE &amp; REMOTING) &lt;br /&gt;&lt;br /&gt;180. What is a WebService and what is the underlying protocol used in it?Why Web Services?&lt;br /&gt;181. Are Web Services a replacement for other distributed computing platforms? &lt;br /&gt;182. In a Webservice, need to display 10 rows from a table. So DataReader or DataSet is best choice? &lt;br /&gt;183. How to generate WebService proxy? What is SOAP, WSDL, UDDI and the concept behind Web Services? What are various components of WSDL? What is the use of WSDL.exe utility?&lt;br /&gt;184. How to generate proxy class other than .net app and wsdl tool?&lt;br /&gt;185. What is a proxy in web service? How do I use a proxy server when invoking a Web service? &lt;br /&gt;186. asynchronous web service means? &lt;br /&gt;187. What are the events fired when web service called? &lt;br /&gt;188. How will do transaction in Web Services? &lt;br /&gt;189. How does SOAP transport happen and what is the role of HTTP in it? How you can access a webservice using soap? &lt;br /&gt;190. What are the different formatters can be used in both? Why?.. binary/soap &lt;br /&gt;191. How you will protect / secure a web service?&lt;br /&gt;192. How will you expose/publish a webservice? &lt;br /&gt;193. What is disco file? &lt;br /&gt;194. What’s the attribute for webservice method? What is the namespace for creating webservice?&lt;br /&gt;195. What is Remoting? &lt;br /&gt;196. Difference between web services &amp; remoting? &lt;br /&gt;197. Can you pass SOAP messages through remoting? &lt;br /&gt;198. CAO and SAO.&lt;br /&gt;199. singleton and singlecall.&lt;br /&gt;200. What is Asynchronous Web Services? &lt;br /&gt;201. Web Client class and its methods? &lt;br /&gt;202. Flow of remoting? &lt;br /&gt;203. What is the use of trace utility?&lt;br /&gt;&lt;br /&gt;(XML)&lt;br /&gt;&lt;br /&gt;204. Explain the concept of data island? &lt;br /&gt;205. How to use XML DOM model on client side using JavaScript. &lt;br /&gt;206. What are the ways to create a tree view control using XML, XSL &amp; JavaScript? &lt;br /&gt;207. Questions on XPathNavigator, and the other classes in System.XML Namespace? &lt;br /&gt;208. What is Use of Template in XSL? &lt;br /&gt;209. What is “Well Formed XML” and “Valid XML” &lt;br /&gt;210. How you will do SubString in XSL &lt;br /&gt;211. Can we do sorting in XSL ? how do you deal sorting columns dynamically in XML. &lt;br /&gt;212. What is “Async” property of XML Means ? &lt;br /&gt;213. What is XPath Query ? &lt;br /&gt;214. Difference Between Element and Node. &lt;br /&gt;215. What is CDATA Section. &lt;br /&gt;216. DOM &amp; SAX parsers explanation and difference &lt;br /&gt;217. What is GetElementbyname method will do? &lt;br /&gt;218. What is selectnode method will give? &lt;br /&gt;219. What is valid xml document? What a well formed xml document? &lt;br /&gt;220. What is the Difference between XmlDocument and XmlDataDocument? &lt;br /&gt;221. Explain what a DiffGram is, and a good use for one? &lt;br /&gt;222. If I replace my Sqlserver with XML files and how about handling the same? &lt;br /&gt;223. Write syntax to serialize class using XML Serializer?&lt;br /&gt;&lt;br /&gt;(IIS) &lt;br /&gt;&lt;br /&gt;224. In which process does IIS runs (was asking about the EXE file) &lt;br /&gt;225. Where are the IIS log files stored?&lt;br /&gt;226. What are the different IIS authentication modes in IIS 5.0 and Explain? &lt;br /&gt;227. Difference between basic and digest authentication modes?&lt;br /&gt;228. How to configure the sites in Web server (IIS)? &lt;br /&gt;229. Advantages in IIS 6.0?&lt;br /&gt;230. IIS Isolation Levels?&lt;br /&gt;&lt;br /&gt;Controls &lt;br /&gt;&lt;br /&gt;231. How will you do Redo and Undo in a TextControl? &lt;br /&gt;232. How to implement DataGrid in .NET? How would u make a combo-box appear in one column of a DataGrid? What are the ways to show data grid inside a data grid for a master details type of tables? If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why? &lt;br /&gt;233. How can we create Tree control in asp.net?&lt;br /&gt;&lt;br /&gt;Programming &lt;br /&gt;&lt;br /&gt;234. Write a program in C# for checking a given number is PRIME or not. &lt;br /&gt;235. Write a program to find the angle between the hours and minutes in a clock &lt;br /&gt;236. Write a C# program to find the Factorial of n &lt;br /&gt;237. How do I upload a file from my ASP.NET page?&lt;br /&gt;238. How do I send an email message from my ASP.NET page?&lt;br /&gt;239. Write a program to create a user control with name and surname as data members and login as method and also the code to call it. (Hint use event delegates) Practical Example of Passing an Events to delegates &lt;br /&gt;240. How can you read 3rd line from a text file?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-82208563844381452?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/82208563844381452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/dotnet-interview-questions-faqs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/82208563844381452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/82208563844381452'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/dotnet-interview-questions-faqs.html' title='Dotnet interview questions - FAQ&apos;s'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-2917563279675839253</id><published>2010-02-11T01:53:00.003-08:00</published><updated>2010-02-11T01:53:44.723-08:00</updated><title type='text'>Diff between intersect and innerjoin in SQL Server?</title><content type='html'>- Innerjoin gives duplicate rows where as intersect is not&lt;br /&gt;- Innerjoin + distinct keyword = intersect&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-2917563279675839253?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/2917563279675839253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/diff-between-intersect-and-innerjoin-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/2917563279675839253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/2917563279675839253'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/diff-between-intersect-and-innerjoin-in.html' title='Diff between intersect and innerjoin in SQL Server?'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-7650976525027693809</id><published>2010-02-11T01:53:00.001-08:00</published><updated>2010-02-11T01:53:18.687-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cursors in SQL Server'/><title type='text'>Cursors in SQL Server</title><content type='html'>USE Northwind&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;DECLARE @Counter INT&lt;br /&gt;DECLARE @EmployeeID INT&lt;br /&gt;&lt;br /&gt;DECLARE Employees_Cursor CURSOR FOR&lt;br /&gt;SELECT EmployeeID FROM Employees&lt;br /&gt;&lt;br /&gt;OPEN Employees_Cursor&lt;br /&gt;&lt;br /&gt;FETCH NEXT FROM Employees_Cursor into @EmployeeID&lt;br /&gt;&lt;br /&gt;WHILE @@FETCH_STATUS = 0&lt;br /&gt;BEGIN&lt;br /&gt;SELECT * FROM Orders WHERE EmployeeID = @EmployeeID&lt;br /&gt;FETCH NEXT FROM Employees_Cursor into @EmployeeID&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;CLOSE Employees_Cursor&lt;br /&gt;DEALLOCATE Employees_Cursor&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-7650976525027693809?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/7650976525027693809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/cursors-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7650976525027693809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7650976525027693809'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/cursors-in-sql-server.html' title='Cursors in SQL Server'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-5823596903135738377</id><published>2010-02-11T01:52:00.001-08:00</published><updated>2010-02-11T01:52:57.067-08:00</updated><title type='text'>Some basics in SQL Server</title><content type='html'>SET ROWCOUNT 1000&lt;br /&gt;SET NOCOUNT ON&lt;br /&gt;&lt;br /&gt;Randomly taking records from a table&lt;br /&gt;Select empname, newID() Randomcol from emp where empid=1 order by newID() &lt;br /&gt;&lt;br /&gt;@@Rowcount – is used to find number of rows effected by a sql statement&lt;br /&gt;Select @@Rowcount AS rowcount&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-5823596903135738377?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/5823596903135738377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/some-basics-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/5823596903135738377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/5823596903135738377'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/some-basics-in-sql-server.html' title='Some basics in SQL Server'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-8824779667893101044</id><published>2010-02-11T01:51:00.000-08:00</published><updated>2010-02-11T01:52:05.029-08:00</updated><title type='text'>TO FIND THE 3RD HIGHEST SAL IN EMP TABLE</title><content type='html'>select max(sal) from emp where sal not in(select distinct &lt;br /&gt;top 2 sal from emp order by sal desc)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-8824779667893101044?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/8824779667893101044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/to-find-3rd-highest-sal-in-emp-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8824779667893101044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8824779667893101044'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/to-find-3rd-highest-sal-in-emp-table.html' title='TO FIND THE 3RD HIGHEST SAL IN EMP TABLE'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-5993057537756659083</id><published>2010-02-11T01:50:00.000-08:00</published><updated>2010-02-11T01:51:03.336-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Normal Forms in SQL Server'/><title type='text'>Normal Forms in SQL Server</title><content type='html'>&lt;strong&gt;First Normal Form (1NF)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;First normal form (1NF) sets the very basic rules for an organized database: &lt;br /&gt;• Eliminate duplicative columns from the same table. &lt;br /&gt;• Create separate tables for each group of related data and identify each row with a unique column or set of columns (the primary key). &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Second Normal Form (2NF)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Second normal form (2NF) further addresses the concept of removing duplicative data: &lt;br /&gt;• Meet all the requirements of the first normal form. &lt;br /&gt;• Remove subsets of data that apply to multiple rows of a table and place them in separate tables. &lt;br /&gt;• Create relationships between these new tables and their predecessors through use of foreign keys. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Third Normal Form (3NF)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Third normal form (3NF) goes one large step further: &lt;br /&gt;• Meet all the requirements of the second normal form. &lt;br /&gt;• Remove columns that are not dependent upon the primary key. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Fourth Normal Form (4NF)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Finally, fourth normal form (4NF) has one additional requirement: &lt;br /&gt;• Meet all the requirements of the third normal form. &lt;br /&gt;• A relation is in 4NF if it has no multi-valued dependencies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-5993057537756659083?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/5993057537756659083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/normal-forms-in-sql-server.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/5993057537756659083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/5993057537756659083'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/normal-forms-in-sql-server.html' title='Normal Forms in SQL Server'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-1962013963023000335</id><published>2010-02-11T01:45:00.000-08:00</published><updated>2010-02-11T01:49:01.379-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net Page life cycle'/><title type='text'>ASP.Net Page life cycle - simple overview</title><content type='html'>&lt;strong&gt;Page_Init&lt;/strong&gt; - Initialization of the page    &lt;br /&gt;&lt;strong&gt;LoadViewState&lt;/strong&gt; - Loading of the View State      &lt;br /&gt;&lt;strong&gt;LoadPostData&lt;/strong&gt; - processing of the Post back data     &lt;br /&gt;&lt;strong&gt;Page_Load&lt;/strong&gt; - Loading of Page  &lt;br /&gt;&lt;strong&gt;RaisePostDataChangedEvent&lt;/strong&gt; - Notification of PostBack   &lt;br /&gt;&lt;strong&gt;RaisePostBackEvent&lt;/strong&gt; - Handling of PostBack Event    &lt;br /&gt;&lt;strong&gt;Page_PreRender&lt;/strong&gt; - Pre Rendering of Page     &lt;br /&gt;&lt;strong&gt;SaveViewState&lt;/strong&gt; - Saving of view state     &lt;br /&gt;&lt;strong&gt;Page_Render&lt;/strong&gt; - Rendering of Page   &lt;br /&gt;&lt;strong&gt;Page_UnLoad&lt;/strong&gt; - Unloading of the Page&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-1962013963023000335?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/1962013963023000335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/aspnet-page-life-cycle-simple-overview.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1962013963023000335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1962013963023000335'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/aspnet-page-life-cycle-simple-overview.html' title='ASP.Net Page life cycle - simple overview'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-7421448965117897243</id><published>2010-02-11T01:34:00.000-08:00</published><updated>2010-02-11T01:35:07.136-08:00</updated><title type='text'>Difference between sqlserver 2000 and sqlserver 2005</title><content type='html'>- In SQL Server 2000 the Query Analyzer and Enterprise Manager are seperate,whereas in SQL Server 2005 both were combined as Management Studio. &lt;br /&gt;- In Sql 2005,the new datatype XML is used,whereas in Sql 2000 there is no such datatype &lt;br /&gt;- In Sql server2000 we can create 65,535 databases,whereas in Sql server2005 2(pow(20))-1 databases can be created.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-7421448965117897243?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/7421448965117897243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/difference-between-sqlserver-2000-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7421448965117897243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7421448965117897243'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/difference-between-sqlserver-2000-and.html' title='Difference between sqlserver 2000 and sqlserver 2005'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-8940704550160383698</id><published>2010-02-11T01:30:00.000-08:00</published><updated>2010-02-26T06:45:05.979-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Events in GridView'/><title type='text'>Events in GridView control of ASP.NET</title><content type='html'>&lt;strong&gt;For Edit&lt;/strong&gt;&lt;br /&gt;void myGridView_RowEditing(object sender, GridViewEditEventArgs e)&lt;br /&gt;{&lt;br /&gt;myGridView.EditIndex = e.NewEditIndex;&lt;br /&gt;BindData(); &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For Cancel&lt;/strong&gt;&lt;br /&gt;void myGridView_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)&lt;br /&gt;{&lt;br /&gt;myGridView.EditIndex = -1;&lt;br /&gt;BindData(); &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For Update&lt;/strong&gt;&lt;br /&gt;void myGridView_RowUpdating(object sender, GridViewUpdateEventArgs e)&lt;br /&gt;{&lt;br /&gt;GridViewRow row = myGridView.Rows[e.RowIndex];&lt;br /&gt;if (row != null)&lt;br /&gt;{&lt;br /&gt;TextBox t = row.FindControl("TextBox1") as TextBox;&lt;br /&gt;if (t != null)&lt;br /&gt;{&lt;br /&gt;Response.Write("The Text Entered is" + t.Text); &lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For Select&lt;/strong&gt;&lt;br /&gt;void myGridView_SelectedIndexChanged(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;// This will contain the selectedValue of the row &lt;br /&gt;string selectedCategory = myGridView.SelectedRow.Cells[1].Text;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;For paging&lt;/strong&gt;&lt;br /&gt;void myGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)&lt;br /&gt;{&lt;br /&gt;myGridView.PageIndex = e.NewPageIndex;&lt;br /&gt;BindData(); &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// In Datagrid&lt;br /&gt;OnPageIndexChanged ="PageData"&lt;br /&gt;protected void PageData(Object source, DataGridPageChangedEventArgs e ) &lt;br /&gt;{ &lt;br /&gt;     DataGrid1.CurrentPageIndex = e.NewPageIndex; &lt;br /&gt;     Binddata(); &lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-8940704550160383698?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/8940704550160383698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/events-in-gridview-control-of-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8940704550160383698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8940704550160383698'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/events-in-gridview-control-of-aspnet.html' title='Events in GridView control of ASP.NET'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-3673669758748252578</id><published>2010-02-11T01:29:00.000-08:00</published><updated>2010-02-11T01:30:21.514-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Delegates in C#'/><title type='text'>Delegates in C# - Simple Explanation</title><content type='html'>&lt;strong&gt;Delegates&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;=========&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- also referred to as a type safe function pointer&lt;br /&gt;- Improves the performance an application&lt;br /&gt;- Used to call a method asynchronously &lt;br /&gt;- You should follow the same syntax as in the method &lt;br /&gt;- Example on multicast delegates: &lt;br /&gt; delegate void Delegate_Multicast(int x, int y);&lt;br /&gt; Class Class2&lt;br /&gt; {&lt;br /&gt;     static void Method1(int x, int y)&lt;br /&gt;     {&lt;br /&gt;         Console.WriteLine("You r in Method 1");&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     static void Method2(int x, int y)&lt;br /&gt;     {&lt;br /&gt;         Console.WriteLine("You r in Method 2");&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     public static void "on" /&gt;Main()&lt;br /&gt;     {&lt;br /&gt;         Delegate_Multicast func = new Delegate_Multicast(Method1);&lt;br /&gt;         func += new Delegate_Multicast(Method2);&lt;br /&gt;         func(1,2);             // Method1 and Method2 are called&lt;br /&gt;         func -= new Delegate_Multicast(Method1);&lt;br /&gt;         func(2,3);             // Only Method2 is called&lt;br /&gt;     }&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-3673669758748252578?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/3673669758748252578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/delegates-in-c-simple-explanation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3673669758748252578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3673669758748252578'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/delegates-in-c-simple-explanation.html' title='Delegates in C# - Simple Explanation'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-8914282371183162940</id><published>2010-02-11T01:26:00.000-08:00</published><updated>2010-02-11T01:27:23.583-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='abstract classes and interfaces'/><title type='text'>Difference between abstract classes and interfaces in C#</title><content type='html'>&lt;strong&gt;Abstract Classes&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- In abstract class a method must be declared as abstract&lt;br /&gt;- For abstract methods there will be no body&lt;br /&gt;- The Abstract methods can delare with Access modifiers(public,internal,protected etc)But when implementing in subclass same   access modifier we have to use.&lt;br /&gt;- The Abstract class can contain variables and concrete methods&lt;br /&gt;- Multiple inheritance is not possible &lt;br /&gt;- must and should call all the abstract methods in the derived class&lt;br /&gt;- To implement abstract method in derived class we have to use override keyword&lt;br /&gt;- The accessmodifiers and return types(like void,int etc) must be same in abstract method and in derived class method&lt;br /&gt;- we cannot create an object to abstract classes&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Interfaces&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- For interface methods also there will be no body &lt;br /&gt;- In Interfaces we cannot use any access modifiers.By default these methods are public.&lt;br /&gt;- We cannot declare variables and concrete methods in interfaces&lt;br /&gt;- Multiple inheritance is possible&lt;br /&gt;- must and should call all the interface methods in the derived class&lt;br /&gt;- To implement interface methods in derived class no need of override keyword&lt;br /&gt;- The accessmodifiers and return types(like void,int etc) must be same in interface methods and in derived class methods&lt;br /&gt;- we cannot create an object to interfaces&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-8914282371183162940?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/8914282371183162940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/difference-between-abstract-classes-and.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8914282371183162940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/8914282371183162940'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/difference-between-abstract-classes-and.html' title='Difference between abstract classes and interfaces in C#'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-1222382557936351317</id><published>2010-02-10T01:53:00.000-08:00</published><updated>2010-02-10T01:54:27.515-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Using unsafe code in C#'/><title type='text'>Using unsafe code in C# in easy manner</title><content type='html'>class ClassName&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;//pointer&lt;br /&gt;&lt;br /&gt;unsafe int * ptr;&lt;br /&gt;&lt;br /&gt;unsafe void MyMethod()&lt;br /&gt;{&lt;br /&gt;//you can use pointers here&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;To declare unsafe local variables in a method, you have to put them in unsafe blocks as the following:&lt;br /&gt;&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;//can't use pointers here&lt;br /&gt;&lt;br /&gt;unsafe&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;//here you can declare and use pointer&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//can't use pointers here&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;=======&lt;br /&gt;&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;int var1 = 5;&lt;br /&gt;&lt;br /&gt;unsafe&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;int * ptr1, ptr2;&lt;br /&gt;&lt;br /&gt;ptr1 = &amp;var1;&lt;br /&gt;&lt;br /&gt;ptr2 = ptr1;&lt;br /&gt;&lt;br /&gt;*ptr2 = 20;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Console.WriteLine(var1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;OUTPUE: 20&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-1222382557936351317?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/1222382557936351317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/using-unsafe-code-in-c-in-easy-manner.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1222382557936351317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1222382557936351317'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/using-unsafe-code-in-c-in-easy-manner.html' title='Using unsafe code in C# in easy manner'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-3122072748902573879</id><published>2010-02-01T04:51:00.000-08:00</published><updated>2010-02-01T04:53:04.936-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADO.NET basics reference'/><title type='text'>ADO.NET basics reference</title><content type='html'>- ADO.NET objects - Connection, Command, DataSet, DataReader, DataAdapter&lt;br /&gt;&lt;br /&gt;- DataSet consists of a collection of tables, relationships, and constraints&lt;br /&gt;&lt;br /&gt;- The GetChanges method of the DataSet object actually creates a second DataSet that contains only the changes to the data.     This DataSet is then used by a DataAdapter (or other objects) to update the original data source. &lt;br /&gt;&lt;br /&gt;- DataAdapter object works as a bridge between the DataSet and the source data(database)&lt;br /&gt;&lt;br /&gt;- DataReader for forwardonly and readonly stream of data&lt;br /&gt;&lt;br /&gt;- DataAdapter updates the data from dataset to Database using update, insert, delete command or by using SqlCommandBuilder      which automatically generates the update commands.(Example4)&lt;br /&gt;&lt;br /&gt;- SqlDataAdapter manages the connection itself, meaning it opens the connection and it closes the connection. If you&lt;br /&gt;  open the connection yourself, it detects this and it will not close the connection. You need to close the connection     manually.&lt;br /&gt;&lt;br /&gt;- SqlDataAdapter attach error messages to rows in a dataset by using RowError property(Example5). Then you can walk the error   in a DataTable with the GetErrors() method. You can also test for errors using HasErrors.&lt;br /&gt;&lt;br /&gt;- use RejectChanges on the DataSet, in which case the Row is restored.&lt;br /&gt;&lt;br /&gt;- The SqlDataAdapter and SqlCommand are very similar, except for the Fill and Update methods. The Fill method fills the     dataset, Update method takes changes from a DataSet and pushes them back into the database. This is accomplished by four     commands specified on the DataAdapter. These commands are: SelectCommand, UpdateCommand, InsertCommand, and DeleteCommand.    CommandBuilder object can generate these at run time based on a select statement. However, this run-time generation     requires an extra round trip to the server to gather required metadata, so explicitly providing the insert, update, and     delete commands at design time will result in better run-time performance. &lt;br /&gt;&lt;br /&gt;- Filter Dataset using its select method&lt;br /&gt; Ex: ds.Select("custname like 'Sri%'");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Example1:&lt;br /&gt;&lt;br /&gt; SqlConnection con=new SqlConnection(constring);&lt;br /&gt; SqlCommand com=new SqlCommand();&lt;br /&gt; SqlTransaction trans;&lt;br /&gt; con.open();&lt;br /&gt; com.Connection=con;&lt;br /&gt; //Begin Transaction&lt;br /&gt; trans=con.BeginTransaction();&lt;br /&gt; com.Transaction=trans;&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt;  com.CommandText = "Delete from emp where empid=10";&lt;br /&gt;  com.ExecuteNonQuery();&lt;br /&gt;  com.CommandText = "Insert into emp(empid) values(10)";&lt;br /&gt;  com.ExecuteNonQuery();&lt;br /&gt;  trans.Commit();&lt;br /&gt; }&lt;br /&gt; catch(Exception e)&lt;br /&gt; {&lt;br /&gt;  trans.Rollback();&lt;br /&gt; } &lt;br /&gt; finally&lt;br /&gt; {&lt;br /&gt;  con.Close();&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;- Example2:&lt;br /&gt;&lt;br /&gt; // Example using stored procedures-create, drop, in and out parameters&lt;br /&gt; string spsql1="create procedure proc_name @name nchar(10), @id int out as select @id=empid from emp where empname=@name";&lt;br /&gt; string spsql2="IF EXISTS ( select name from sysobjects where name='proc_name' and type='P') DROP PROCEDURE proc_name";&lt;br /&gt; SqlConnection con=new SqlConnection(constring);&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt;  SqlCommand com1=new SqlCommand(spsql1,con);&lt;br /&gt;  SqlCommand com2=new SqlCommand(spsql2,con);&lt;br /&gt;  com2.ExecuteNonQuery();&lt;br /&gt;  com1.ExecuteNonQuery();&lt;br /&gt; &lt;br /&gt;  SqlCommand com3=new SqlCommand("proc_name",con);&lt;br /&gt;  com3.CommandType=CommandType.StoredProcedure;&lt;br /&gt;&lt;br /&gt;  SqlParameter params=null;&lt;br /&gt;  params=com3.Parameters.Add("@name", SqlDbType.NChar, 10);&lt;br /&gt; &lt;br /&gt;  // By default the parameter direction is input. So no need to specify the below statement.&lt;br /&gt;  params.Direction = ParameterDirection.Input;&lt;br /&gt;  com3.Parameters["@name"].value="ABCD"; &lt;br /&gt;&lt;br /&gt;  params=com3.Parameters.Add("@id", SqlDbType.Int, 10);&lt;br /&gt;  params.Direction=ParameterDirection.Output;&lt;br /&gt;&lt;br /&gt;  com3.ExecuteNonQuery();&lt;br /&gt; &lt;br /&gt;  Console.WriteLine(com3.Parameters["@id"].value);&lt;br /&gt; }&lt;br /&gt; Catch(Exception e)&lt;br /&gt; {&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; finally&lt;br /&gt; {&lt;br /&gt;  con.Close();&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;- Example3:&lt;br /&gt; //using dataset&lt;br /&gt; string sqlstr="select * from emp";&lt;br /&gt; SqlConnection con=new SqlConnection(constring);&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt;  SqlCommand com1=new SqlCommand(sqlstr,con);&lt;br /&gt;  SqlDataAdapter sa=new SqlDataAdapter(com1);&lt;br /&gt;  DataSet ds = new DataSet();&lt;br /&gt;  // we can use directly SqlDataAdapter as&lt;br /&gt;  // SqlDataAdapter sa=new SqlDataAdapter(sqlstr,con);&lt;br /&gt;  sa.fill(ds,"Emp");&lt;br /&gt;  foreach (DataRow dr in ds.Tables["Emp"].Rows)&lt;br /&gt;  {&lt;br /&gt;   Console.WriteLine(dr["empid"].ToString());&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; catch(Exception e)&lt;br /&gt; {&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;- Example4:&lt;br /&gt; //update using SqlDataAdapter and SqlCommandBuilder&lt;br /&gt; string sqlstr1="select * from emp";&lt;br /&gt; string sqlstr2="select * from dept";&lt;br /&gt; SqlConnection con=new SqlConnection(constring);&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt;  SqlCommand com1=new SqlCommand(sqlstr1,con);&lt;br /&gt;  SqlCommand com2=new SqlCommand(sqlstr2,con);&lt;br /&gt;  SqlDataAdapter sa1=new SqlDataAdapter(com1);&lt;br /&gt;  SqlDataAdapter sa2=new SqlDataAdapter(com2);&lt;br /&gt;  DataSet ds = new DataSet();&lt;br /&gt;  DataRow dr;&lt;br /&gt;  &lt;br /&gt;  // Create command builder. This line automatically generates the update commands for you, so you don't &lt;br /&gt;                // have to provide or create your own.&lt;br /&gt;  SqlCommandBuilder mySqlCommandBuilder = new SqlCommandBuilder(sa1);&lt;br /&gt;&lt;br /&gt;                // Set the MissingSchemaAction property to AddWithKey because Fill will not cause primary&lt;br /&gt;                // key &amp; unique key information to be retrieved unless AddWithKey is specified.&lt;br /&gt;                sa1.MissingSchemaAction = MissingSchemaAction.AddWithKey;&lt;br /&gt;                sa2.MissingSchemaAction = MissingSchemaAction.AddWithKey;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;  sa1.fill(ds,"Emp");&lt;br /&gt;  sa2.fill(ds,"Dept");&lt;br /&gt;&lt;br /&gt;  // ADD RELATION&lt;br /&gt;  ds.Relations.Add("empdept", ds.Tables[0].Columns["empid"], ds.Tables[1].Columns["empid"]);&lt;br /&gt;&lt;br /&gt;  // EDIT&lt;br /&gt;  ds.Tables[0].Rows[0]["empname"] = "Pinkoo";&lt;br /&gt;&lt;br /&gt;  // ADD&lt;br /&gt;  dr=ds.Tables[0].NewRow();&lt;br /&gt;  dr["empid"]=10;&lt;br /&gt;  dr["empname"]="simpy";&lt;br /&gt;  ds.Tables[0].Rows.Add(dr);&lt;br /&gt;  &lt;br /&gt;  //Update Database with SqlDataAdapter&lt;br /&gt;  da1.Update(ds,"Emp");&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt; catch(Exception e)&lt;br /&gt; {&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;-Example5:&lt;br /&gt; // Create a new dataview instance on the emp table that was just created&lt;br /&gt;        DataView myDataView = new DataView(myDataSet.Tables["emp"]);&lt;br /&gt;        // Sort the view based on the empname column&lt;br /&gt;        myDataView.Sort = "empname";&lt;br /&gt;        myDataSet.Tables["emp"].Rows[0].RowError = "An Error was added";&lt;br /&gt;        myDataSet.Tables["emp"].Rows[1].RowError = "This is another error message";&lt;br /&gt;        if (myDataSet.Tables["Customers"].HasErrors)&lt;br /&gt;        {&lt;br /&gt;         DataRow[] ErrDataRows = myDataSet.Tables["emp"].GetErrors();&lt;br /&gt;  for (int i = 0; i &lt;= ErrDataRows.Length - 1; i++)&lt;br /&gt;                {&lt;br /&gt;                }&lt;br /&gt; }&lt;br /&gt;  &lt;br /&gt;-Example6:&lt;br /&gt; //using Relations in a dataset&lt;br /&gt; string sqlstr1="select * from emp";&lt;br /&gt; string sqlstr2="select * from dept";&lt;br /&gt; SqlConnection con=new SqlConnection(constring);&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt;  SqlCommand com1=new SqlCommand(sqlstr1,con);&lt;br /&gt;  SqlCommand com2=new SqlCommand(sqlstr2,con);&lt;br /&gt;  SqlDataAdapter sa1=new SqlDataAdapter(com1);&lt;br /&gt;  SqlDataAdapter sa2=new SqlDataAdapter(com2);&lt;br /&gt;  DataSet ds = new DataSet();&lt;br /&gt;    &lt;br /&gt;  sa1.fill(ds,"Emp");&lt;br /&gt;  sa2.fill(ds,"Dept");&lt;br /&gt;&lt;br /&gt;  // ADD RELATION&lt;br /&gt;  ds.Relations.Add("empdept", ds.Tables[0].Columns["empid"], ds.Tables[1].Columns["empid"]);&lt;br /&gt;  &lt;br /&gt;  foreach (DataRow dr1 in ds.Tables[0].Rows)&lt;br /&gt;  {&lt;br /&gt;   //access dr1["empid"] &lt;br /&gt;   foreach (DataRow dr2 in dr1.GetChildRows(ds.Relations["empdept"]))&lt;br /&gt;   {&lt;br /&gt;    //access dr2["deptid"]  &lt;br /&gt;   }&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-3122072748902573879?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/3122072748902573879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/adonet-basics-reference.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3122072748902573879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/3122072748902573879'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/02/adonet-basics-reference.html' title='ADO.NET basics reference'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-1318157920952586611</id><published>2010-01-29T18:24:00.001-08:00</published><updated>2010-01-29T18:24:51.543-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Partial Classes in C#'/><title type='text'>Partial Classes in C#</title><content type='html'>- Usually a class placed in a single file. But to use that class in multiple files we can use partial classes.&lt;br /&gt;- Partial allows classes, structs, interfaces to span across multiple files.&lt;br /&gt;- Ex:&lt;br /&gt; //file1.cs&lt;br /&gt; partial class Class1&lt;br /&gt; {&lt;br /&gt;  public void m1()&lt;br /&gt;  {&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; //file2.cs &lt;br /&gt; partial class Class1&lt;br /&gt; {&lt;br /&gt;  public void m2()&lt;br /&gt;  {&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;- After compile the source like&lt;br /&gt; &lt;br /&gt; partial class Class1&lt;br /&gt; {&lt;br /&gt;  public void m1()&lt;br /&gt;  {&lt;br /&gt;  }&lt;br /&gt;  public void m2()&lt;br /&gt;  {&lt;br /&gt;  }&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-1318157920952586611?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/1318157920952586611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/01/partial-classes-in-c.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1318157920952586611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/1318157920952586611'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/01/partial-classes-in-c.html' title='Partial Classes in C#'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-7855620093537180758</id><published>2010-01-29T18:23:00.001-08:00</published><updated>2010-01-29T18:23:49.376-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Readonly fields in C#'/><title type='text'>Readonly Fields in C# classes</title><content type='html'>- whose value shouldnot be changed as "Const" but where the value is not known until runtime.&lt;br /&gt;- "Const" fields are internally static, but we need to declare as static for "Readonly" fields.&lt;br /&gt;- Readonly fields are constants and also allow to do some calculations to determine the initial value of the fields, but const fileds are not.&lt;br /&gt;- We can assign values to Readonly fields in constructors only not anywhere else.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-7855620093537180758?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/7855620093537180758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/01/readonly-fields-in-c-classes.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7855620093537180758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7855620093537180758'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/01/readonly-fields-in-c-classes.html' title='Readonly Fields in C# classes'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-7562679268872854737</id><published>2010-01-29T18:18:00.000-08:00</published><updated>2010-01-29T18:26:39.715-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Classes in C#'/><title type='text'>All about classes in C#</title><content type='html'>- Classes contains datamembers and function members.&lt;br /&gt;- Datamembers are fields, constants, events. &lt;br /&gt;- Function members are methods, properties, constructors, finalizers, operators, indexers.&lt;br /&gt;&lt;br /&gt;Methods&lt;br /&gt;========&lt;br /&gt;- Methods in C# must have return type atleast void. &lt;br /&gt;&lt;br /&gt;Value types and Reference types&lt;br /&gt;&lt;br /&gt;- Value type stores its value directly and reference type stores a reference to the value.&lt;br /&gt;- reference types stored on the heap, value types stored on the stack&lt;br /&gt;- reference types are passed by using ref keyword.&lt;br /&gt;- we must initialize the variable before it is passed to a method, either by value type or reference type. By using "OUT" parameters we can pass the variables to the method that has not been initialized. &lt;br /&gt;- If the OUT parameter is not assigned a value within the body of the function then the method won't compile.&lt;br /&gt;- Examples for val, ref, out parameters&lt;br /&gt; public class ExforType&lt;br /&gt; {&lt;br /&gt;  pubic void valTypeFunc(string s, int j)&lt;br /&gt;  {&lt;br /&gt;   s="bird";&lt;br /&gt;  }&lt;br /&gt;  pubic void refTypeFunc(ref string s, int m)&lt;br /&gt;  {&lt;br /&gt;   s="bird";&lt;br /&gt;  }&lt;br /&gt;  pubic void outTypeFunc(out string s, int n)&lt;br /&gt;  {&lt;br /&gt;   s="bird";&lt;br /&gt;  }&lt;br /&gt;  public static int main(String args[])&lt;br /&gt;  {&lt;br /&gt;   int i=0;&lt;br /&gt;   string s="cat";&lt;br /&gt;   string st="dog";&lt;br /&gt;   valTypeFunc(s,i); &lt;br /&gt;   Console.WriteLine(s) &lt;br /&gt;   refTypeFunc(ref s,i);&lt;br /&gt;   Console.WriteLine(s)&lt;br /&gt;   outTypeFunc(out st,i);&lt;br /&gt;   Console.WriteLine(st)&lt;br /&gt;  } &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; output:&lt;br /&gt; &lt;br /&gt; cat&lt;br /&gt; bird&lt;br /&gt; bird&lt;br /&gt;&lt;br /&gt;Method overloading&lt;br /&gt;==================&lt;br /&gt;&lt;br /&gt;- Methods with the same name but different numbers or types of parameters&lt;br /&gt;- It is not sufficient for two methods to differ only in return types and ref,out parameters.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Properties&lt;br /&gt;==========&lt;br /&gt;&lt;br /&gt;- Properties are useful to provide security for the variables. If you don't want to modify a variable better use properties.&lt;br /&gt;- Properties are defined by using get and set accessors.&lt;br /&gt;- Example&lt;br /&gt; private string name;&lt;br /&gt; Private string nameProperty&lt;br /&gt; {&lt;br /&gt;  get &lt;br /&gt;  {&lt;br /&gt;   return "Somename"&lt;br /&gt;  }&lt;br /&gt;  Private set&lt;br /&gt;  {&lt;br /&gt;   name="somename";&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;- Readonly properties - donot have set, writeonly properties - donot have get &lt;br /&gt;- Property have only public get and private, protected set. one of the accessor must follow the access level of the property. In the above example set accessor follows the property access level.&lt;br /&gt;&lt;br /&gt;Best Explanaion : &lt;a href="http://www.csharphelp.com/2006/01/what-why-properties-in-c-part-1/"&gt;http://www.csharphelp.com/2006/01/what-why-properties-in-c-part-1/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Inline methods&lt;br /&gt;- There is no inline methods concept in C#. JIT compiler replaces all function calls by inline code.&lt;br /&gt;&lt;br /&gt;Constructors&lt;br /&gt;============&lt;br /&gt;&lt;br /&gt;- Constructors are special functions that are called automatically when an object is instantiated.&lt;br /&gt;- They must have the same name as the class and cannot have return type.&lt;br /&gt;- Useful for intializing the values of fields.&lt;br /&gt;- two types of constructors instance constructors(are executed when an object of that class is created) and static constructors(is executed only once and will be invoked before your code makes any reference to the class)&lt;br /&gt;&lt;br /&gt;static constructors&lt;br /&gt;===================&lt;br /&gt;&lt;br /&gt;- static constructors doesnot have any reference types&lt;br /&gt;- called by the .NET runtime when the class is loaded and not to be called by any code.&lt;br /&gt;- static constructors cannot take any parameters&lt;br /&gt;- there can be only one static constructor for a class.&lt;br /&gt;- static constructors are used if we want to intialize static fields or properties before the class is first used&lt;br /&gt;- static constructors can only access static members of the class&lt;br /&gt;- Example&lt;br /&gt; public class SCTest&lt;br /&gt; {&lt;br /&gt;  public static readonly Color choice;&lt;br /&gt;  static SCTest()&lt;br /&gt;  {&lt;br /&gt;   &lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Static Classes&lt;br /&gt;==============&lt;br /&gt;&lt;br /&gt;-A static class may only contain static members.&lt;br /&gt;- Ex:&lt;br /&gt; static class ExClass&lt;br /&gt; {&lt;br /&gt;  public static void method1()&lt;br /&gt;  {&lt;br /&gt;  }&lt;br /&gt; } &lt;br /&gt; ExClass.method1();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-7562679268872854737?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/7562679268872854737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/01/all-about-classes-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7562679268872854737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7562679268872854737'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/01/all-about-classes-in-c.html' title='All about classes in C#'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6491959455773035792.post-7419780542778402811</id><published>2010-01-29T18:15:00.000-08:00</published><updated>2010-01-29T18:16:41.235-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='classes and structs in C#'/><title type='text'>Differnce between C# classes and structs</title><content type='html'>- Classes are reference types stored on the heap, structs are value types stored on the stack or inline(if they are part of another object that is stored on the heap)&lt;br /&gt;&lt;br /&gt;- Classes support inheritance, structs don't support inheritance.&lt;br /&gt;&lt;br /&gt;- Ex:&lt;br /&gt; Class ExClass&lt;br /&gt; {&lt;br /&gt;  public const string billday="Monday";&lt;br /&gt;  int custid;&lt;br /&gt; }&lt;br /&gt;   &lt;br /&gt; struct ExStruct&lt;br /&gt; {&lt;br /&gt;  public const string billday="Monday";&lt;br /&gt;  int custid;&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; ExClass ec=new ExClass();&lt;br /&gt; ExStruct es=new ExStruct();&lt;br /&gt;&lt;br /&gt;- If we need small datastructures, for performance reasons, we will go for structs instead of classes&lt;br /&gt;&lt;br /&gt;- In classes, if we are not define any constructor, the compiler provides a default one otherwise not. But in structs, compiler always supplies a default no-parameter constructor.&lt;br /&gt;&lt;br /&gt;- All classes derived from System.Object and all structs derived from System.ValueType.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6491959455773035792-7419780542778402811?l=dotnetwithexamples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetwithexamples.blogspot.com/feeds/7419780542778402811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/01/differnce-between-c-classes-and-structs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7419780542778402811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6491959455773035792/posts/default/7419780542778402811'/><link rel='alternate' type='text/html' href='http://dotnetwithexamples.blogspot.com/2010/01/differnce-between-c-classes-and-structs.html' title='Differnce between C# classes and structs'/><author><name>Dotnetin</name><uri>http://www.blogger.com/profile/02133205210749158050</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
