<?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-1659674788540926262</id><updated>2012-02-17T04:58:12.507+05:30</updated><category term='Threading'/><category term='Serilization'/><category term='Database Recovery'/><category term='Email'/><category term='Satellite Assembly'/><category term='Fix/Solution'/><category term='Multilingual'/><category term='Explorer'/><category term='PL/SQL'/><category term='Culture'/><category term='VB.NET'/><category term='Memory Management'/><category term='Blogspot'/><category term='Database Manipulation'/><category term='ASP.NET'/><category term='ADO.NET'/><category term='C#'/><category term='Crystal Report'/><category term='SQL SERVER 2005'/><category term='LINQ to Objects'/><category term='SMPT Client'/><category term='OOPS'/><category term='DataType'/><category term='HTML'/><category term='SQL SERVER'/><category term='JavaScript'/><category term='.NET 3.5'/><category term='.NET'/><category term='JavaScript-getElementById'/><title type='text'>Dynamic Coding</title><subtitle type='html'>the Code that u would want.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-1125693192296949860</id><published>2009-12-13T22:52:00.042+05:30</published><updated>2009-12-14T09:34:24.343+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>How to transform XML into XHTML using XSLT through XslCompiledTransform class</title><content type='html'>&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;XSLT (XSL Transformations):&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;XML - based language used for the transformation of XML documents into HTML documents. The transformation may happen dynamically either on the client or on the server.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;XslCompiledTransform class:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The XslCompiledTransform class is an XSLT processor that supports the XSLT 1.0 syntax. It is a new implementation and includes performance gains when compared to the obsolete XslTransform class.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;"Data.Xml" file&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="color:#996633;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;xml&lt;/span&gt; &lt;/span&gt;version="1.0" &lt;span style="color:#3333ff;"&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;books&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;book&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;id&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#996633;"&gt;1 &lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;id&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;name&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;XML Concepts&lt;/span&gt;&lt;/name&gt; &lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;name&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;author &lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;AUTHOR1 &lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt; &lt;span style="color:#cc6600;"&gt;&lt;span style="color:#cc6600;"&gt;author&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;price &lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;40.00 &lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#cc6600;"&gt;price&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;book&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#cc6600;"&gt;&lt;/span&gt;book&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt; &lt;/span&gt;id&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;2 &lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#cc6600;"&gt;id&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;name&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;Website Programming&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;name &lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;name&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;author&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;AUTHOR2 &lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#cc6600;"&gt;author&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;price&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;50.00 &lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#cc6600;"&gt;price&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;book&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;book&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;id&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;3 &lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#cc6600;"&gt;id&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;name&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;LINQ Concepts&lt;span style="color:#3333ff;"&gt; &amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#cc6600;"&gt;name&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;author&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;AUTHOR3 &lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#cc6600;"&gt;author&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;price&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;10.00&lt;span style="color:#3333ff;"&gt; &amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#cc6600;"&gt;price&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;book&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#cc6600;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#cc6600;"&gt;books&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Data.XSLT file&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;?&lt;span style="color:#cc6600;"&gt;&amp;lt;xml&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;version&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;1.0&lt;span style="color:#000000;"&gt;"&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;encoding&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;utf-8"?&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#339999;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;xsl:stylesheet&lt;/span&gt; version="1.0" xmlns:xsl=&lt;a href="http://www.w3.org/1999/XSL/Transform"&gt;http://www.w3.org/1999/XSL/Transform&lt;/a&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339999;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;xsl:output&lt;/span&gt; method="html"/&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#339999;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;xsl:template&lt;/span&gt; match="/"&lt;span style="color:#3333ff;"&gt;&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;html&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;head&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;title&lt;/span&gt;&amp;gt;&lt;span style="color:#000000;"&gt;How to use XslCompiledTransform Class in asp.net&lt;/span&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;title&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;head&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;body&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;h2&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;color:DarkOrange; font-style:italic;&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&amp;gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;XSLT - Using XslCompiledTransform&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;amp;lt&lt;/span&gt;;/&lt;span style="color:#cc6600;"&gt;h2&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;hr&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;width&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;370&lt;span style="color:#000000;"&gt;"&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;align&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;left&lt;span style="color:#000000;"&gt;"&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;color&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;Orange&lt;span style="color:#000000;"&gt;"&lt;/span&gt; /&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;br&lt;/span&gt; /&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;table&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;border&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;1&lt;span style="color:#000000;"&gt;"&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;cellpadding&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;5&lt;span style="color:#000000;"&gt;" &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;cellspacing&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;0&lt;span style="color:#000000;"&gt;"&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;bordercolor&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;CornFlowerBlue&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;tr&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;bgcolor&lt;/span&gt;=&lt;span style="color:#333333;"&gt;"&lt;/span&gt;DodgerBlue&lt;span style="color:#000000;"&gt;"&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;&lt;span style="color:#000000;"&gt;="&lt;/span&gt;color:White; font-weight:bold&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;align&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;center&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&amp;gt;&lt;span style="color:#000000;"&gt;Name of Book&lt;/span&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt;&amp;gt;&lt;span style="color:#000000;"&gt;Name of Author&lt;/span&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt;&amp;gt;&lt;span style="color:#000000;"&gt;Book Price&lt;/span&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;tr&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#339999;"&gt;xsl:for-each&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;select&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;books/book&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;tr&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;bgcolor&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;Snow&lt;span style="color:#000000;"&gt;"&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;color:Black; font-weight:normal; font-style:italic;&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;height&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;10&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#339999;"&gt;xsl:value-of&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;select&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;name&lt;span style="color:#000000;"&gt;"&lt;/span&gt;/&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;height&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;10&lt;em&gt;&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&lt;/em&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#339999;"&gt;xsl:value-of&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; select&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;author&lt;span style="color:#000000;"&gt;"&lt;/span&gt;/&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#ff0000;"&gt;td&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;height&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;10&lt;span style="color:#000000;"&gt;"&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;style&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;font-weight:bold;&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;span style="color:#339999;"&gt;xsl:value-of &lt;span style="color:#ff0000;"&gt;select&lt;/span&gt;=&lt;span style="color:#000000;"&gt;"&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;price&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;"&lt;/span&gt;/&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;td&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;tr&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#339999;"&gt;xsl:for-each&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;table&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;body&lt;/span&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;span style="color:#cc6600;"&gt;html&lt;/span&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#339999;"&gt;xsl:template&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#339999;"&gt;xsl:stylesheet&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Transform XML into HTML using XslCompiledTransform class:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Data;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Configuration;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Web;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Web.Security;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Web.UI;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Xml;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Xml.XPath;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Xml.Xsl;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;public partial class&lt;/span&gt; &lt;span style="color:#339999;"&gt;Default&lt;/span&gt; : System.Web.UI.&lt;span style="color:#339999;"&gt;Page&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;protected void&lt;/span&gt; Page_Load(&lt;span style="color:#3333ff;"&gt;object&lt;/span&gt; sender, &lt;span style="color:#339999;"&gt;EventArgs&lt;/span&gt; e)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; xmlFilePath = Request.PhysicalApplicationPath + &lt;span style="color:#cc6600;"&gt;@"App_Data\Data.xml"&lt;/span&gt;;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; xsltPath = Request.PhysicalApplicationPath + &lt;span style="color:#cc6600;"&gt;@"App_Data\Data.xslt"&lt;/span&gt;;&lt;br /&gt;&lt;span style="color:#339999;"&gt;XPathDocument&lt;/span&gt; xPathDoc = new &lt;span style="color:#339999;"&gt;XPathDocument&lt;/span&gt;(xmlFilePath);&lt;br /&gt;&lt;span style="color:#339999;"&gt;XslCompiledTransform&lt;/span&gt; transform = new &lt;span style="color:#339999;"&gt;XslCompiledTransform&lt;/span&gt;();&lt;br /&gt;transform.Load(xsltPath);&lt;br /&gt;transform.Transform(xPathDoc, &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;, Response.Output);&lt;br /&gt;}&lt;br /&gt;}&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#009900;"&gt;Output of Above page is :&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SyVH9tNDk9I/AAAAAAAAAEk/bTFusS-PKT4/s1600-h/1.JPG"&gt;&lt;img style="WIDTH: 374px; HEIGHT: 215px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5414813252414837714" border="0" alt="" src="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SyVH9tNDk9I/AAAAAAAAAEk/bTFusS-PKT4/s400/1.JPG" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-1125693192296949860?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/1125693192296949860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=1125693192296949860' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1125693192296949860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1125693192296949860'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/12/how-to-transform-xml-into-xhtml-using.html' title='How to transform XML into XHTML using XSLT through XslCompiledTransform class'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3NZnKv5E_Ak/SyVH9tNDk9I/AAAAAAAAAEk/bTFusS-PKT4/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-9083551743903077335</id><published>2009-08-19T22:54:00.007+05:30</published><updated>2009-08-20T22:48:47.336+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>In .NET how to achieve Multiple Inheritance using Interface</title><content type='html'>&lt;p&gt;Diamond Problem :&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The Diamond problem is related to object oriented languages that allow multiple inheritance.As we know C# does not support multiple inheritance of classes, but it does support multiple inheritance through interfaces. Therefore, the same ambiguity may arise unless &lt;strong style="color: rgb(255, 0, 0);"&gt;explicit&lt;/strong&gt; &lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;interface implementation&lt;/span&gt; is used. Going explicitly, we can have different implementations to the same method. The problem is solved.&lt;br /&gt;&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3NZnKv5E_Ak/Sow4xUlZRXI/AAAAAAAAAEU/zTlljEiCGIE/s1600-h/2.JPG"&gt;&lt;img style="cursor: pointer; width: 126px; height: 170px;" src="http://1.bp.blogspot.com/_3NZnKv5E_Ak/Sow4xUlZRXI/AAAAAAAAAEU/zTlljEiCGIE/s400/2.JPG" alt="" id="BLOGGER_PHOTO_ID_5371730875536459122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;namespace &lt;/span&gt;MulipleInheritance&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public interface &lt;/span&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;IntBC&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: rgb(51, 51, 255);"&gt;void &lt;/span&gt;Display();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public interface&lt;/span&gt; &lt;span style="color: rgb(51, 204, 255);"&gt;IntA&lt;/span&gt; : &lt;span style="color: rgb(51, 204, 255);"&gt;IntBC&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;   &lt;span style="color: rgb(51, 51, 255);"&gt; new void&lt;/span&gt; Display();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public interface&lt;/span&gt; &lt;span style="color: rgb(51, 204, 255);"&gt;IntB &lt;/span&gt;: &lt;span style="color: rgb(51, 204, 255);"&gt;IntBC&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: rgb(51, 51, 255);"&gt;new void&lt;/span&gt; Display();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;// C class implements the IntA and IntB interfaces&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public class&lt;/span&gt; &lt;span style="color: rgb(51, 204, 255);"&gt;C &lt;/span&gt;: &lt;span style="color: rgb(51, 204, 255);"&gt;IntA&lt;/span&gt;, &lt;span style="color: rgb(51, 204, 255);"&gt;IntB&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: rgb(0, 153, 0);"&gt;// explicitly implement the Display() method of the IntA interface&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(51, 51, 255);"&gt;void &lt;/span&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;IntA&lt;/span&gt;.Display()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(51, 204, 255);"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(153, 0, 0);"&gt;"IntA implementation of Display()"&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: rgb(0, 153, 0);"&gt;// implement the Display() method of the IntB interface&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: rgb(51, 51, 255);"&gt;public void&lt;/span&gt; Display()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(51, 204, 255);"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(153, 0, 0);"&gt;"IntB implementation of Display()"&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;public class &lt;/span&gt;MainClass&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: rgb(51, 51, 255);"&gt;public static void&lt;/span&gt; Main()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(51, 204, 255);"&gt;C &lt;/span&gt;ObjC = &lt;span style="color: rgb(51, 51, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;C&lt;/span&gt;();&lt;br /&gt;        &lt;span style="color: rgb(51, 204, 255);"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(153, 0, 0);"&gt;"Calling ObjC.Display()"&lt;/span&gt;);&lt;br /&gt;        ObjC.Display();&lt;br /&gt;       &lt;span style="color: rgb(0, 153, 0);"&gt; // cast ObjC to IntB&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(51, 204, 255);"&gt;IntA &lt;/span&gt;RefIntA = ObjC &lt;span style="color: rgb(51, 51, 255);"&gt;as &lt;/span&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;IntA&lt;/span&gt;;&lt;br /&gt;        Console.WriteLine(&lt;span style="color: rgb(153, 0, 0);"&gt;"Calling RefIntA.Display()"&lt;/span&gt;);&lt;br /&gt;        RefIntA.Display();&lt;br /&gt;        &lt;span style="color: rgb(0, 153, 0);"&gt;// cast ObjC to IntA&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: rgb(51, 204, 255);"&gt;IntB &lt;/span&gt;RefIntB = ObjC &lt;span style="color: rgb(51, 51, 255);"&gt;as &lt;/span&gt;&lt;span style="color: rgb(51, 204, 255);"&gt;IntB&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: rgb(51, 204, 255);"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(153, 0, 0);"&gt;"Calling RefIntB.Display()"&lt;/span&gt;);&lt;br /&gt;        RefIntB.Display();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0); font-weight: bold;"&gt;Output &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;Calling ObjC.Display()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;IntB implementation of Display()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;Calling RefIntA.Display()&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;IntA implementation of Display()&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;Calling RefIntB.Display()&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;IntB implementation of Display()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In Class C, first Display() method is explicitly implemented for IntA Interface. Explicit implementation is not needed for the second Display() method, because previous statement already did that and the method implementation is automatically assumed to IntB interface. In order to call explicit implementation method casting is required.&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-9083551743903077335?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/9083551743903077335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=9083551743903077335' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/9083551743903077335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/9083551743903077335'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/08/how-to-solve-diamond-problem-using.html' title='In .NET how to achieve Multiple Inheritance using Interface'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3NZnKv5E_Ak/Sow4xUlZRXI/AAAAAAAAAEU/zTlljEiCGIE/s72-c/2.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-1197580737750222380</id><published>2009-08-19T20:05:00.005+05:30</published><updated>2009-08-19T20:56:59.377+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Why Multiple inheritance is not supported in .NET</title><content type='html'>&lt;span style="font-family:Arial;color:black;"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Multiple Inheritance:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Multiple inheritance may allow you to write compact code but it has some program difficulties like "diamond problem" for example&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;color:black;"&gt;Diamond problem :&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_3NZnKv5E_Ak/SowSBYXba0I/AAAAAAAAAEE/h1qS6Av4b78/s1600-h/2.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5371688270476045122" style="WIDTH: 75px; CURSOR: pointer; HEIGHT: 146px" alt="" src="http://3.bp.blogspot.com/_3NZnKv5E_Ak/SowSBYXba0I/AAAAAAAAAEE/h1qS6Av4b78/s400/2.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;&lt;br /&gt;class &lt;/span&gt;&lt;span style="COLOR: rgb(51,204,255)"&gt;BaseClass&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;public abstract void&lt;/span&gt; Display();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;class &lt;/span&gt;&lt;span style="COLOR: rgb(51,204,255)"&gt;A &lt;/span&gt;: &lt;span style="COLOR: rgb(51,204,255)"&gt;BaseClass&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;public override void&lt;/span&gt; Display()&lt;br /&gt;{&lt;br /&gt;Debug.WriteLine(&lt;span style="COLOR: rgb(153,0,0)"&gt;"First Child A"&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;class &lt;/span&gt;&lt;span style="COLOR: rgb(51,204,255)"&gt;B&lt;/span&gt; : &lt;span style="COLOR: rgb(51,204,255)"&gt;BaseClass&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;public override void&lt;/span&gt; Display()&lt;br /&gt;{&lt;br /&gt;Debug.WriteLine(&lt;span style="COLOR: rgb(153,0,0)"&gt;"Second Child B"&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(0,153,0)"&gt;//Now Suppose that c# support multiple inheritance&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;class &lt;/span&gt;&lt;span style="COLOR: rgb(51,204,255)"&gt;C &lt;/span&gt;:&lt;span style="COLOR: rgb(51,204,255)"&gt; A&lt;/span&gt;, B&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;public class&lt;/span&gt; &lt;span style="COLOR: rgb(51,204,255)"&gt;MainClass&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="COLOR: rgb(51,51,255)"&gt;public static void&lt;/span&gt; main()&lt;br /&gt;{&lt;br /&gt;&lt;span style="COLOR: rgb(51,204,255)"&gt;C&lt;/span&gt; ObjC =&lt;span style="COLOR: rgb(51,51,255)"&gt;new &lt;/span&gt;&lt;span style="COLOR: rgb(51,204,255)"&gt;C&lt;/span&gt;();&lt;br /&gt;ObjC.Display();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Arial;color:black;"&gt;By excuting &lt;/span&gt;ObjC.Display()&lt;span style="font-family:Arial;color:black;"&gt; method Diamond problem is generated. It means which Display method going to executed.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-1197580737750222380?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/1197580737750222380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=1197580737750222380' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1197580737750222380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1197580737750222380'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/08/why-multiple-inherritance-is-not.html' title='Why Multiple inheritance is not supported in .NET'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3NZnKv5E_Ak/SowSBYXba0I/AAAAAAAAAEE/h1qS6Av4b78/s72-c/2.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-6822583785102352731</id><published>2009-08-13T19:48:00.006+05:30</published><updated>2009-08-13T22:34:09.468+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER 2005'/><title type='text'>Exception Handling in SQL Server 2005</title><content type='html'>&lt;strong&gt;&lt;br /&gt;Exception Handling in 2000:&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt; &lt;div  style="font-family:arial;"&gt;In SQL Server 2000 Exception handling was implmented with the help of &lt;span style="color: rgb(255, 0, 0);"&gt;@@ERROR &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;statement&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.  Each and every statement you have to check the value of Error number. Practically it is not easiest things to do.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt; &lt;div  style="font-family:arial;"&gt; &lt;/div&gt; &lt;div  style="font-family:arial;"&gt;&lt;strong&gt;Exception Handling in 2005:&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt; &lt;div  style="font-family:arial;"&gt;In .NET programming exception are handled with help of &lt;span style="color: rgb(255, 0, 0);"&gt;TRY - CATCH&lt;/span&gt; block. Similarly TRY - CATCH block is implmented in SQL Server 2005. When you are exceuting the procedure if error occured then catch block statements are exceuted. This technique is applicable only for the  run time errors.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;div  style="font-family:arial;"&gt; &lt;/div&gt; &lt;div  style="font-family:arial;"&gt;The following functions are used to get the error details&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;div  style="font-family:arial;"&gt;ERROR_NUMBER()&lt;br /&gt;ERROR_SEVERITY()&lt;br /&gt;ERROR_STATE()&lt;br /&gt;ERROR_PROCEDURE()&lt;br /&gt;ERROR_LINE()&lt;br /&gt;ERROR_MESSAGE()&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;div  style="font-family:arial;"&gt; &lt;/div&gt; &lt;div  style="font-family:arial;"&gt;&lt;strong&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt; &lt;div  style="font-family:arial;"&gt; &lt;/div&gt; &lt;div  style="font-family:arial;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;CREATE PROCEDURE&lt;/span&gt; PROCEXCEPHANDLING&lt;/div&gt; &lt;div style="color: rgb(51, 51, 255); font-family: arial;"&gt;AS&lt;/div&gt;&lt;div style="color: rgb(51, 51, 255); font-family: arial;"&gt; &lt;/div&gt; &lt;span style="color: rgb(51, 51, 255);font-family:arial;" &gt;BEGIN&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;div  style="font-family:arial;"&gt; &lt;/div&gt; &lt;div face="arial"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;BEGIN &lt;/span&gt;TRY&lt;br /&gt;&lt;/div&gt; &lt;div face="arial"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;SELECT &lt;/span&gt;100/0&lt;/div&gt; &lt;div face="arial"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;END &lt;/span&gt;TRY&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;div face="arial"&gt; &lt;/div&gt; &lt;div face="arial"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;BEGIN &lt;/span&gt;CATCH       &lt;/div&gt; &lt;div style="color: rgb(51, 51, 255); font-family: arial;"&gt;Select &lt;/div&gt; &lt;div face="arial"&gt;ERROR_NUMBER() &lt;span style="color: rgb(51, 51, 255);"&gt;AS  &lt;/span&gt;ErrNo,&lt;/div&gt; &lt;div face="arial"&gt;ERROR_SEVERITY() &lt;span style="color: rgb(51, 51, 255);"&gt;AS &lt;/span&gt;ErrSev,&lt;/div&gt; &lt;div face="arial"&gt;ERROR_STATE() &lt;span style="color: rgb(51, 51, 255);"&gt;AS &lt;/span&gt;ErrState,&lt;/div&gt; &lt;div face="arial"&gt;ERROR_PROCEDURE() &lt;span style="color: rgb(51, 51, 255);"&gt;AS &lt;/span&gt;ErrProc,&lt;/div&gt; &lt;div face="arial"&gt;ERROR_LINE() &lt;span style="color: rgb(51, 51, 255);"&gt;AS &lt;/span&gt;ErrLine,&lt;/div&gt; &lt;div style="font-family: arial;"&gt;ERROR_MESSAGE() &lt;span style="color: rgb(51, 51, 255);"&gt;AS &lt;/span&gt;ErrMsg&lt;/div&gt; &lt;div style="font-family: arial;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;END &lt;/span&gt;CATCH&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;div style="font-family: arial;"&gt; &lt;/div&gt; &lt;div style="color: rgb(51, 51, 255); font-family: arial;"&gt;END&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;div style="font-family: arial;"&gt; &lt;/div&gt; &lt;div style="font-family: arial;"&gt;Executing the above procedure&lt;br /&gt;&lt;/div&gt; &lt;div style="font-family: arial;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Exec &lt;/span&gt;PROCEXCEPHANDLING&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;div style="font-family: arial;"&gt; &lt;/div&gt; &lt;div&gt;&lt;span style="font-family:arial;"&gt;Output of above statement is&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SoRGe4xv9ZI/AAAAAAAAAD8/hDoTqJFei3Q/s1600-h/1.jpg"&gt;&lt;img style="cursor: pointer; width: 501px; height: 72px;" src="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SoRGe4xv9ZI/AAAAAAAAAD8/hDoTqJFei3Q/s400/1.jpg" alt="" id="BLOGGER_PHOTO_ID_5369494152183543186" border="0" /&gt;&lt;/a&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-6822583785102352731?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/6822583785102352731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=6822583785102352731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6822583785102352731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6822583785102352731'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/08/exception-handling-in-sql-server-2005.html' title='Exception Handling in SQL Server 2005'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3NZnKv5E_Ak/SoRGe4xv9ZI/AAAAAAAAAD8/hDoTqJFei3Q/s72-c/1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-9052881213477291120</id><published>2009-08-11T15:34:00.005+05:30</published><updated>2009-08-13T22:49:38.932+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Static Constructor in C#</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Static Constructors:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is a Special type of constructor.  It gets called before the creation of first object of class(Probably at the time of loading an assembly).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Rules to create a static constructor:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;There is no access modifier require to define a static constructor.&lt;/li&gt;&lt;li&gt;There may be only one static constructor in a class.&lt;/li&gt;&lt;li&gt; The static constructor may not have any parameters.&lt;/li&gt;&lt;li&gt; This constructor may only access the static members of the class&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Static constructor is used to initialize static data members as soon as the class is referenced first time.You can also initialize static data members where we declare them in the code.&lt;br /&gt;&lt;br /&gt;Like this :&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public static int&lt;/span&gt; id = 10;&lt;br /&gt;&lt;br /&gt;But value of one static member may depend upon the value of another static member .In order to handle such cases you need some manipulation before static members going to be initialize.&lt;br /&gt;This you can achieve through static constructors.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;namespace&lt;/span&gt; StaticConstructor&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class &lt;span style="color: rgb(0, 204, 204);"&gt;MainClass&lt;/span&gt;&lt;br /&gt; {&lt;br /&gt;    &lt;span style="color: rgb(51, 51, 255);"&gt; static void&lt;/span&gt; Main(&lt;span style="color: rgb(51, 51, 255);"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;     {&lt;br /&gt;         &lt;span style="color: rgb(0, 204, 204);"&gt;Console&lt;/span&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;.&lt;/span&gt;WriteLine(&lt;span style="color: rgb(204, 0, 0);"&gt;"Id value is "&lt;/span&gt; + &lt;span style="color: rgb(0, 204, 204);"&gt;ClsStaticConstructor&lt;/span&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;.&lt;/span&gt;id);&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;class&lt;/span&gt; &lt;span style="color: rgb(0, 204, 204);"&gt;ClsStaticConstructor&lt;/span&gt;&lt;br /&gt; {&lt;br /&gt;     &lt;span style="color: rgb(51, 51, 255);"&gt;public static int&lt;/span&gt; id;&lt;br /&gt;&lt;br /&gt;     &lt;span style="color: rgb(51, 51, 255);"&gt;static&lt;/span&gt; ClsStaticConstructor()&lt;br /&gt;     {&lt;br /&gt;         &lt;span style="color: rgb(51, 51, 255);"&gt;if&lt;/span&gt; &lt;span style="color: rgb(0, 204, 204);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;Sample&lt;/span&gt;&lt;span style="color: rgb(0, 204, 204);"&gt;.&lt;/span&gt;Value == 10)&lt;br /&gt;             id = 20;&lt;br /&gt;         &lt;span style="color: rgb(51, 51, 255);"&gt;else&lt;/span&gt;&lt;br /&gt;             id = 40;&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;public class&lt;/span&gt; &lt;span style="color: rgb(0, 204, 204);"&gt;Sample&lt;/span&gt;&lt;br /&gt; {&lt;br /&gt;    &lt;span style="color: rgb(51, 51, 255);"&gt; public static int&lt;/span&gt; Value = 10;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;br /&gt;Output&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;Id value is : 20&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-9052881213477291120?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/9052881213477291120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=9052881213477291120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/9052881213477291120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/9052881213477291120'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/08/static-constructor-in-c.html' title='Static Constructor in C#'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-3253874044868727719</id><published>2009-07-26T23:05:00.004+05:30</published><updated>2009-07-26T23:36:13.024+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER 2005'/><title type='text'>PIVOT function in SQL Server 2005</title><content type='html'>&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;PIVOT:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This is one of the most important enhancements to TSQL in SQL 2005 and is extremely useful for generating reports based on cross tab values.The PIVOT operator rotates rows into columns, optionally performing aggregations or other mathematical calculations along the way.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The syntax for the PIVOT relational operator is:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;FROMtable_source&lt;br /&gt;PIVOT ( aggregate_function ( value_column )&lt;br /&gt;FOR pivot_column&lt;br /&gt;IN (&amp;lt;column_list&amp;gt;&lt;column_list&gt;&lt;column_list&gt;)&lt;br /&gt;) table_alias&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#999999;"&gt;table_source :&lt;/span&gt;&lt;/strong&gt; The table where the data will be pivoted.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#999999;"&gt;aggregate_function :&lt;/span&gt;&lt;/strong&gt; The aggregate function that will be used against the specified column. &lt;strong&gt;&lt;span style="color:#999999;"&gt;pivot_column :&lt;/span&gt;&lt;/strong&gt; The column that will be used to create the column headers.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#999999;"&gt;column_list :&lt;/span&gt;&lt;/strong&gt; The values to pivot from the pivot column.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For Example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;create table&lt;/span&gt; parameter&lt;br /&gt;(&lt;br /&gt;pid &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt;,&lt;br /&gt;pname &lt;span style="color:#3333ff;"&gt;varchar&lt;/span&gt;(50)&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;create table&lt;/span&gt; TransactionInfo&lt;br /&gt;(&lt;br /&gt;TransId &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt;,&lt;br /&gt;pid &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt;,&lt;br /&gt;pvalue &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt;&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; parameter &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(1,&lt;span style="color:#ff0000;"&gt;'Para1'&lt;/span&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; parameter &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(2,&lt;span style="color:#ff0000;"&gt;'Para2'&lt;/span&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; parameter &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(3,&lt;span style="color:#ff0000;"&gt;'Para3'&lt;/span&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; parameter &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(4,&lt;span style="color:#ff0000;"&gt;'Para4'&lt;/span&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; parameter &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(5,&lt;span style="color:#ff0000;"&gt;'Para5'&lt;/span&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; TransactionInfo &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(1,1,30)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into &lt;span style="color:#000000;"&gt;TransactionInfo&lt;/span&gt; values&lt;/span&gt;(1,2,40)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into &lt;span style="color:#000000;"&gt;TransactionInfo&lt;/span&gt; values&lt;/span&gt;(1,3,50)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into &lt;span style="color:#000000;"&gt;TransactionInfo&lt;/span&gt; values&lt;/span&gt;(1,4,35)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into &lt;span style="color:#000000;"&gt;TransactionInfo &lt;/span&gt;values&lt;/span&gt;(1,5,45)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; TransactionInfo &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(2,1,50)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; TransactionInfo &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(2,2,60)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; TransactionInfo &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(2,3,70)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into &lt;span style="color:#000000;"&gt;TransactionInfo &lt;/span&gt;values&lt;/span&gt;(2,4,85)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into &lt;span style="color:#000000;"&gt;TransactionInfo&lt;/span&gt; values&lt;/span&gt;(2,5,45)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In TransactionInfo table row wise records are stored. If you need &lt;span style="color:#ff0000;"&gt;columnwise report&lt;/span&gt; we go for PIVOT functions.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;select&lt;/span&gt; TransID,para1,para2,para3,para4,para5 &lt;span style="color:#3333ff;"&gt;from&lt;/span&gt;&lt;br /&gt;(&lt;span style="color:#3333ff;"&gt;select&lt;/span&gt; a.pname,b.pvalue,TransID &lt;span style="color:#3333ff;"&gt;from&lt;/span&gt; parameter a,TransactionInfo b&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;where&lt;/span&gt; a.pid = b.pid and TransID in (1,2) ) &lt;span style="color:#3333ff;"&gt;as&lt;/span&gt; aa&lt;br /&gt;pivot&lt;br /&gt;(&lt;br /&gt;&lt;span style="color:#cc33cc;"&gt;sum&lt;/span&gt;(pvalue)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;for&lt;/span&gt; pname in([para1],[para2],[para3],[para4],[para5])&lt;br /&gt;) &lt;span style="color:#3333ff;"&gt;as&lt;/span&gt; bb&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Following result set is obtained after executing the above query, which PIVOTS data based on the parameters thats been selected.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;Output of above query is as follows&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmyZkKlYOWI/AAAAAAAAAD0/W-pCwnteEgA/s1600-h/3.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5362830102886889826" style="WIDTH: 331px; CURSOR: hand; HEIGHT: 68px" alt="" src="http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmyZkKlYOWI/AAAAAAAAAD0/W-pCwnteEgA/s400/3.JPG" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-3253874044868727719?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/3253874044868727719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=3253874044868727719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3253874044868727719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3253874044868727719'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/pivot-function-in-sql-server-2005.html' title='PIVOT function in SQL Server 2005'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmyZkKlYOWI/AAAAAAAAAD0/W-pCwnteEgA/s72-c/3.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-3855250914203865710</id><published>2009-07-26T16:56:00.007+05:30</published><updated>2009-07-26T19:53:58.299+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER 2005'/><title type='text'>SQL Server 2005 - INTERSECT and EXCEPT operands.</title><content type='html'>&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;INTERSECT and EXCEPT operands:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Like Union and Union all SQL Server 2005 introduces INTERSECT and EXCEPT operands.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;INTERSECT :&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;It is useful for retrieving only distinct rows that exist in both the left and right queries.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;EXCEPT :&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;It is useful for retrieving only distinct rows that exist in the left query.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;For example :&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;Create table&lt;/span&gt; DeptA&lt;/p&gt;&lt;p&gt;( DeptId &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt;, DeptName &lt;span style="color:#3333ff;"&gt;varchar&lt;/span&gt;(40))&lt;/p&gt;&lt;p&gt;GO&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;Create table&lt;/span&gt; DeptB&lt;/p&gt;&lt;p&gt;( DeptId &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt;, DeptName &lt;span style="color:#3333ff;"&gt;varchar&lt;/span&gt;(40))&lt;/p&gt;&lt;p&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; DeptA &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(10,&lt;span style="color:#ff0000;"&gt;'Sales'&lt;/span&gt;)&lt;/p&gt;&lt;p&gt;GO&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; DeptA &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(20,&lt;span style="color:#ff0000;"&gt;'Service'&lt;/span&gt;)&lt;/p&gt;&lt;p&gt;GO&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; DeptA &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(30,&lt;span style="color:#ff0000;"&gt;'Puchase'&lt;/span&gt;)&lt;/p&gt;&lt;p&gt;GO&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; DeptB &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(10,&lt;span style="color:#ff0000;"&gt;'Sales'&lt;/span&gt;)&lt;/p&gt;&lt;p&gt;GO&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; DeptB &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(20,&lt;span style="color:#ff0000;"&gt;'Service'&lt;/span&gt;)&lt;/p&gt;&lt;p&gt;GO&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; DeptB &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(30,&lt;span style="color:#ff0000;"&gt;'Marketing'&lt;/span&gt;)&lt;/p&gt;&lt;p&gt;GO&lt;/p&gt;&lt;p&gt;&lt;span style="color:#339999;"&gt;--Intersect&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;select&lt;/span&gt; * &lt;span style="color:#3333ff;"&gt;From&lt;/span&gt; DeptA&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;Intersect&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;Select&lt;/span&gt; * &lt;span style="color:#3333ff;"&gt;From&lt;/span&gt; DeptB&lt;/p&gt;&lt;p&gt;GO&lt;/p&gt;&lt;a href="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmxmCYchhBI/AAAAAAAAADk/aOo4X2ztk6w/s1600-h/1.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5362773447399277586" style="WIDTH: 163px; CURSOR: hand; HEIGHT: 69px" alt="" src="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmxmCYchhBI/AAAAAAAAADk/aOo4X2ztk6w/s400/1.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;span style="color:#339999;"&gt;--Except&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;select&lt;/span&gt; * &lt;span style="color:#3333ff;"&gt;From&lt;/span&gt; DeptA&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;Except&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;Select&lt;/span&gt; * &lt;span style="color:#3333ff;"&gt;From&lt;/span&gt; DeptB&lt;/p&gt;&lt;p&gt;GO&lt;/p&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmxmQZJxlWI/AAAAAAAAADs/w22x1hIy4WM/s1600-h/2.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5362773688107242850" style="WIDTH: 161px; CURSOR: hand; HEIGHT: 49px" alt="" src="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmxmQZJxlWI/AAAAAAAAADs/w22x1hIy4WM/s400/2.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-3855250914203865710?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/3855250914203865710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=3855250914203865710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3855250914203865710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3855250914203865710'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/sql-server-2005-intersect-and-except.html' title='SQL Server 2005 - INTERSECT and EXCEPT operands.'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmxmCYchhBI/AAAAAAAAADk/aOo4X2ztk6w/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-489595857143525017</id><published>2009-07-26T12:45:00.016+05:30</published><updated>2009-07-26T14:16:31.768+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>Step by Step procedure of CLR Integration in SQL Server 2005</title><content type='html'>&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;CLR integration in SQL Server 2005:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In T-SQL impossible when we need a stored procedure with some array-operations, text-parsing or complex math operations. However, it is quite easy if our Server allows us to deploy C# or VB.NET code that is used within the Server process. In other words, if we need complex procedural code, we can write it as managed code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;SQL Server 2005&lt;/span&gt; we can write &lt;span style="color:#ff0000;"&gt;store procedure, triggers,user defined functions , user defined&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;types&lt;/span&gt; etc in &lt;span style="color:#ff0000;"&gt;managed code(CLR)&lt;/span&gt; also. It acts as the operating system for the CLR when it is hosted inside SQL Server.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Procedure for Creating CLR integrated Store Procedure in SQL Server 2005 using Visual Studio 2005:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Open Visual Studio 2005 IDE.&lt;br /&gt;· Go to menu File -&gt; New -&gt; Project.&lt;br /&gt;· Within the “New Project” dialog box, select “database” (VB) as the project type and select “SQL Server Project” as the template. Provide your own project name, choose your own location and finally click OK.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_3NZnKv5E_Ak/SmwInCylVkI/AAAAAAAAAC0/LDBuDZcOfao/s1600-h/1.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5362670723148371522" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 290px" alt="" src="http://4.bp.blogspot.com/_3NZnKv5E_Ak/SmwInCylVkI/AAAAAAAAAC0/LDBuDZcOfao/s400/1.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will be prompted with the “New Database Reference” dialog, where you need to provide the instance name of your SQL Server 2005 with database information.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmwJaB-aUgI/AAAAAAAAAC8/oYjiC2UR_Yk/s1600-h/2.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5362671599102874114" style="WIDTH: 266px; CURSOR: hand; HEIGHT: 400px" alt="" src="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmwJaB-aUgI/AAAAAAAAAC8/oYjiC2UR_Yk/s400/2.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When you are prompted for “SQL/CLR debugging” press “YES”.&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_3NZnKv5E_Ak/SmwKRbeK3PI/AAAAAAAAADE/HgHVA6zENqA/s1600-h/3.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5362672550839770354" style="WIDTH: 331px; CURSOR: hand; HEIGHT: 103px" alt="" src="http://2.bp.blogspot.com/_3NZnKv5E_Ak/SmwKRbeK3PI/AAAAAAAAADE/HgHVA6zENqA/s400/3.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Go to the Solution Explorer, right click on project and go to Add -&gt; Stored Procedures&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmwLiL3AsYI/AAAAAAAAADM/jDWSaICnAZs/s1600-h/41.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5362673938218398082" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 398px" alt="" src="http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmwLiL3AsYI/AAAAAAAAADM/jDWSaICnAZs/s400/41.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Select “Stored procedure” as in the template, provide the name of the stored procedure as “StoreProcedure1” and finally click add.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_3NZnKv5E_Ak/SmwL9XnUngI/AAAAAAAAADU/7QhC9Ew3clM/s1600-h/4.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5362674405230288386" style="WIDTH: 400px; CURSOR: hand; HEIGHT: 246px" alt="" src="http://4.bp.blogspot.com/_3NZnKv5E_Ak/SmwL9XnUngI/AAAAAAAAADU/7QhC9Ew3clM/s400/4.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Add your code like this&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Imports&lt;/span&gt; System&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Imports&lt;/span&gt; System.Data&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Imports&lt;/span&gt; System.Data.SqlClient&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Imports&lt;/span&gt; System.Data.SqlTypes&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Imports&lt;/span&gt; Microsoft.SqlServer.Server&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Partial Public Class&lt;/span&gt; StoredProcedures1&lt;br /&gt;&lt;microsoft.sqlserver.server.sqlprocedure()&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Public Shared Sub&lt;/span&gt; SP_DisplayEmp()&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Dim&lt;/span&gt; Con &lt;span style="color:#3333ff;"&gt;As New&lt;/span&gt; SqlConnection(&lt;span style="color:#990000;"&gt;"context connection=true"&lt;/span&gt;)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Try&lt;br /&gt;&lt;/span&gt;Con .Open()&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Dim&lt;/span&gt; Cmd &lt;span style="color:#3333ff;"&gt;As New&lt;/span&gt; SqlCommand(&lt;span style="color:#990000;"&gt;"select eid,ename,sal from emp"&lt;/span&gt;, Con)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Dim&lt;/span&gt; oReader &lt;span style="color:#3333ff;"&gt;As&lt;/span&gt; SqlDataReader&lt;br /&gt;oReader = Cmd .ExecuteReader()&lt;br /&gt;SqlContext.Pipe.Send(oReader)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Catch&lt;/span&gt; ex&lt;span style="color:#3333ff;"&gt; As&lt;/span&gt; Exception&lt;br /&gt;SqlContext.Pipe.Send(ex.ToString())&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;End Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;End Sub&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;End Class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here SqlContext.Pipe statement is an sql ouput statement.&lt;br /&gt;&lt;span style="color:#000000;"&gt;After this &lt;span style="color:#ff0000;"&gt;ReBuild and Deploy&lt;/span&gt; the project through solution explorer.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now new procedure named &lt;span style="color:#ff0000;"&gt;"SP_DisplayEmp"&lt;/span&gt; is added in &lt;span style="color:#ff0000;"&gt;master database&lt;/span&gt;. This procedure retrieve all the data which available in Emp table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Open SQL server 2005 Query wizard and execute the following statements&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;use&lt;/span&gt; master&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#339999;"&gt;--To enable SQL Server 2005 for CLR integration&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;EXEC&lt;/span&gt;&lt;span style="color:#990000;"&gt; sp_configure&lt;/span&gt; @configname = &lt;span style="color:#ff0000;"&gt;'clr enabled'&lt;/span&gt;, @configvalue = 1&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;RECONFIGURE WITH OVERRIDE&lt;/span&gt;&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;create table&lt;/span&gt; emp&lt;br /&gt;(&lt;br /&gt;eid &lt;span style="color:#3333ff;"&gt;varchar&lt;/span&gt;(10),&lt;br /&gt;ename &lt;span style="color:#3333ff;"&gt;varchar&lt;/span&gt;(40),&lt;br /&gt;sal &lt;span style="color:#3333ff;"&gt;int &lt;/span&gt;&lt;br /&gt;)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; emp &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(&lt;span style="color:#ff0000;"&gt;'E01'&lt;/span&gt;,&lt;span style="color:#ff0000;"&gt;'Crys'&lt;/span&gt;,81000)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; emp &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(&lt;span style="color:#ff0000;"&gt;'E02'&lt;span style="color:#000000;"&gt;,&lt;/span&gt;'Jhon'&lt;/span&gt;,72000)&lt;br /&gt;GO&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; emp &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(&lt;span style="color:#ff0000;"&gt;'E03'&lt;span style="color:#000000;"&gt;,&lt;/span&gt;'Gogul'&lt;/span&gt;,90000)&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;execute&lt;/span&gt; SP_DisplayEmp&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;CLR integrated Procedure Ouput is&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmwSdZFNPTI/AAAAAAAAADc/Vklp7FEIX6U/s1600-h/5.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5362681552449649970" style="WIDTH: 162px; CURSOR: hand; HEIGHT: 84px" alt="" src="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmwSdZFNPTI/AAAAAAAAADc/Vklp7FEIX6U/s400/5.JPG" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-489595857143525017?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/489595857143525017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=489595857143525017' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/489595857143525017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/489595857143525017'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/step-by-step-procedure-of-clr.html' title='Step by Step procedure of CLR Integration in SQL Server 2005'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_3NZnKv5E_Ak/SmwInCylVkI/AAAAAAAAAC0/LDBuDZcOfao/s72-c/1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-9028646116151415430</id><published>2009-07-25T17:06:00.010+05:30</published><updated>2009-07-25T18:50:40.387+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serilization'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>XML Serialization in .NET</title><content type='html'>&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;XML Serialization:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;By using XML serialization only &lt;span style="color:#ff0000;"&gt;public properties&lt;/span&gt; and fields can be serialized.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If&lt;span style="color:#ff0000;"&gt; private members&lt;/span&gt; are to be serialized, other serialization methods should be used (&lt;a style="TEXT-DECORATION: none" href="http://dynamic-coding.blogspot.com/2009/07/serailization-in-net.html"&gt;&lt;span style="color:#000066;"&gt;Binary Serialization&lt;/span&gt;&lt;/a&gt; and &lt;a style="TEXT-DECORATION: none" href="http://dynamic-coding.blogspot.com/2009/07/types-of-serialization-in-net.html"&gt;&lt;span style="color:#000066;"&gt;SOAP Serialization&lt;/span&gt;&lt;/a&gt;).&lt;/p&gt;It requires a parameterless constructor. This constructor is called during deserialization.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Serialized form of the object does not contain any &lt;span style="color:#ff0000;"&gt;type, assembly information&lt;/span&gt; of the class. &lt;span style="color:#ff0000;"&gt;Only &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;the data&lt;/span&gt; is stored. &lt;/p&gt;&lt;p&gt;Using XML serialization not all the classes can be serialized. Classes that implement IDictionary cannot be serialized. E.g. Hashtables cannot be serialized. Arrays of objects can be easily serialized. Collections can be serialized but to serialize collections certain rules must be followed.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Null values are not serialized with XML serialization. To include the null members in the serialized form IsNullable attribute should be set to true.&lt;br /&gt;&lt;br /&gt;For example: [ XmlElement( IsNullable = true ) ]&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;Here &lt;span style="color:#ff0000;"&gt;ClsSample&lt;/span&gt; is a Serializable class. It has private and Public members,&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;namespace&lt;/span&gt; XMLSerilization&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public class&lt;/span&gt; &lt;span style="color:#339999;"&gt;ClsSample&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;private int&lt;/span&gt; m_TotalCount = 5;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public String&lt;/span&gt; m_StrWord = "Ten";&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;public void&lt;/span&gt; ReAssignMemberValues()&lt;br /&gt;{&lt;br /&gt;m_TotalCount = 20;&lt;br /&gt;m_StrWord = &lt;span style="color:#990000;"&gt;"Twenty"&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public void&lt;/span&gt; DisplayMemberValueAfterDeSerialization()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#339999;"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#990000;"&gt;"Private member value is "&lt;/span&gt; + m_TotalCount);&lt;br /&gt;&lt;span style="color:#339999;"&gt;Console&lt;/span&gt;.WriteLine&lt;span style="color:#990000;"&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#990000;"&gt;"Public member value is "&lt;/span&gt; + m_StrWord);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Following way you can Serialize and Deserialize the objects(through files)&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Xml;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Xml.Serialization;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;namespace&lt;/span&gt; XMLSerilization&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public class&lt;/span&gt; ClsXML&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public void&lt;/span&gt; ToXMLSerilization(&lt;span style="color:#3333ff;"&gt;Object&lt;/span&gt; objToXml, &lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; filePath)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#339999;"&gt;StreamWriter&lt;/span&gt; stWriter = null;&lt;br /&gt;&lt;span style="color:#339999;"&gt;XmlSerializer&lt;/span&gt; xmlSerializer;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;xmlSerializer = new &lt;span style="color:#339999;"&gt;XmlSerializer&lt;/span&gt;(objToXml.GetType());&lt;br /&gt;stWriter = new &lt;span style="color:#339999;"&gt;StreamWriter&lt;/span&gt;(filePath);&lt;br /&gt;xmlSerializer.Serialize(stWriter, objToXml);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;catch&lt;/span&gt; (Exception exception)&lt;br /&gt;{&lt;br /&gt;throw exception;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;finally&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;if (stWriter != &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;) stWriter.Close();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public object&lt;/span&gt; FromXMLSerilization(&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; filePath, &lt;span style="color:#3333ff;"&gt;Type&lt;/span&gt; type)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#339999;"&gt;XmlSerializer&lt;/span&gt; xmlSerializer;&lt;br /&gt;&lt;span style="color:#339999;"&gt;FileStream&lt;/span&gt; fileStream = &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;xmlSerializer = new &lt;span style="color:#339999;"&gt;XmlSerializer&lt;/span&gt;(type);&lt;br /&gt;fileStream = &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; &lt;span style="color:#339999;"&gt;FileStream&lt;/span&gt;(filePath, &lt;span style="color:#339999;"&gt;FileMode&lt;/span&gt;.Open, &lt;span style="color:#339999;"&gt;FileAccess&lt;/span&gt;.Read);&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;object&lt;/span&gt; objectFromXml = xmlSerializer.Deserialize(fileStream);&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;return&lt;/span&gt; objectFromXml;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;catch&lt;/span&gt; (Exception Ex)&lt;br /&gt;{&lt;br /&gt;throw Ex;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;finally&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;if (fileStream != &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;) fileStream.Close();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Main Class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;namespace&lt;/span&gt; XMLSerilization&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public class&lt;/span&gt; Program&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;static void&lt;/span&gt; Main(&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#339999;"&gt;ClsSample&lt;/span&gt; ObjSample;&lt;br /&gt;&lt;span style="color:#339999;"&gt;ClsXML&lt;/span&gt; ObjXML;&lt;br /&gt;ObjSample = new &lt;span style="color:#339999;"&gt;ClsSample&lt;/span&gt;();&lt;br /&gt;ObjSample.ReAssignMemberValues();&lt;br /&gt;ObjXML = new &lt;span style="color:#339999;"&gt;ClsXML&lt;/span&gt;();&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Serialize&lt;br /&gt;&lt;/span&gt;ObjXML.ToXMLSerilization(ObjSample, &lt;span style="color:#990000;"&gt;"c:\\XMLSerialized.TXT"&lt;/span&gt;);&lt;br /&gt;ObjSample = &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Deserilize&lt;/span&gt;&lt;br /&gt;ClsSample ObjDeseialXML;&lt;br /&gt;ObjDeseialXML = (&lt;span style="color:#339999;"&gt;ClsSample&lt;/span&gt;) ObjXML.FromXMLSerilization(&lt;span style="color:#990000;"&gt;"c:\\XMLSerialized.TXT"&lt;/span&gt;, typeof(&lt;span style="color:#339999;"&gt;ClsSample&lt;/span&gt;)) ;&lt;br /&gt;ObjDeseialXML.DisplayMemberValueAfterDeSerialization();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;Output :&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;Private member value is 5&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;Public member value is Twenty&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;Actually reassigned value for the private member is 20 but you are unable to get that value in deserialized object. Because XML Serilization does not keep private members information&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-9028646116151415430?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/9028646116151415430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=9028646116151415430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/9028646116151415430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/9028646116151415430'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/xml-serialization-in-net.html' title='XML Serialization in .NET'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-7673269886782606046</id><published>2009-07-25T13:43:00.009+05:30</published><updated>2009-07-25T18:45:58.276+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serilization'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>SOAP Serialization in .NET</title><content type='html'>&lt;p&gt;&lt;a class="pageTitle" id="#Page7"&gt;&lt;strong&gt;SOAP Serialization&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; :&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;SOAP Serialization and &lt;a style="TEXT-DECORATION: none" href="http://dynamic-coding.blogspot.com/2009/07/serailization-in-net.html"&gt;&lt;span style="color:#000066;"&gt;Binary Serialization&lt;/span&gt; &lt;/a&gt;having many similar properties.&lt;br /&gt;&lt;br /&gt;In SOAP Serialization private fields, type information including assembly, namespace, public key token information are also serialized.&lt;br /&gt;&lt;br /&gt;Deserialization gives the same object as it was before serialization.&lt;br /&gt;&lt;br /&gt;Serialization can be controlled to exclude a field using [NonSerialized] attribute.&lt;br /&gt;&lt;br /&gt;[Serializable] attribute is used to mark a class as serializable.&lt;br /&gt;&lt;br /&gt;Classes do not need to have a parameterless constructor. Because of performance issues, the constructor of the class is not called during deserialization.&lt;br /&gt;&lt;br /&gt;Use if the serialization and deserialization platforms are not .NET.&lt;br /&gt;&lt;br /&gt;Use if the message is sent through a firewall.&lt;br /&gt;&lt;br /&gt;Here &lt;span style="color:#ff0000;"&gt;ClsSample&lt;/span&gt; is a Serializable class. It has private and Public members,&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Text; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#3333ff;"&gt;namespace&lt;/span&gt; SOAPSerilization&lt;br /&gt;{&lt;br /&gt;[&lt;span style="color:#339999;"&gt;Serializable&lt;/span&gt;]&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public class&lt;/span&gt; &lt;span style="color:#339999;"&gt;ClsSample&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;private int&lt;/span&gt; m_TotalCount = 5;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public String&lt;/span&gt; m_StrWord = &lt;span style="color:#990000;"&gt;"Ten"&lt;/span&gt;;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public void&lt;/span&gt; ReAssignMemberValues()&lt;br /&gt;{&lt;br /&gt;m_TotalCount = 20;&lt;br /&gt;m_StrWord = &lt;span style="color:#990000;"&gt;"Twenty"&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public void&lt;/span&gt; DisplayMemberValueAfterDeSerialization()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#339999;"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#990000;"&gt;"Private member value is "&lt;/span&gt; + m_TotalCount);&lt;br /&gt;&lt;span style="color:#339999;"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#990000;"&gt;"Public member value is "&lt;/span&gt; + m_StrWord);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;Following way you can Serialize and Deserialize the objects(through files)&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Runtime.Serialization;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Runtime.Serialization.Formatters.Soap; &lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;namespace&lt;/span&gt; SOAPSerialization&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public class&lt;/span&gt; ClsSOAP&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Serialization&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public void&lt;/span&gt; ToSoapSerialization(&lt;span style="color:#3333ff;"&gt;Object&lt;/span&gt; objToSoap,&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; filePath)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#339999;"&gt;IFormatter&lt;/span&gt; formatter;&lt;br /&gt;&lt;span style="color:#339999;"&gt;FileStream&lt;/span&gt; fileStream = &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;fileStream = &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; &lt;span style="color:#339999;"&gt;FileStream&lt;/span&gt;(filePath,&lt;span style="color:#339999;"&gt;FileMode&lt;/span&gt;.Create, &lt;span style="color:#339999;"&gt;FileAccess&lt;/span&gt;.Write);&lt;br /&gt;formatter = new &lt;span style="color:#339999;"&gt;SoapFormatter&lt;/span&gt;();&lt;br /&gt;formatter.Serialize(fileStream, objToSoap);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;catch&lt;/span&gt; (&lt;span style="color:#339999;"&gt;Exception&lt;/span&gt; exception)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;throw&lt;/span&gt; exception;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;finally&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;if (fileStream != &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;) fileStream.Close();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Deserialization&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public object&lt;/span&gt; FromSoapSerialization(&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; filePath)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#339999;"&gt;IFormatter&lt;/span&gt; formatter;&lt;br /&gt;&lt;span style="color:#339999;"&gt;FileStream&lt;/span&gt; fileStream = &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;fileStream = new &lt;span style="color:#339999;"&gt;FileStream&lt;/span&gt;(filePath,&lt;span style="color:#339999;"&gt;FileMode&lt;/span&gt;.Open, &lt;span style="color:#339999;"&gt;FileAccess&lt;/span&gt;.Read);&lt;br /&gt;formatter = new &lt;span style="color:#339999;"&gt;SoapFormatter&lt;/span&gt;();&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;return&lt;/span&gt; formatter.Deserialize(fileStream);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;catch&lt;/span&gt; (&lt;span style="color:#339999;"&gt;Exception&lt;/span&gt; exception)&lt;br /&gt;{&lt;br /&gt;throw exception;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;finally&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;if (fileStream != &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;) fileStream.Close();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;//Main Class&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Text; &lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;namespace&lt;/span&gt; SOAPSerialization&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;public class&lt;/span&gt; &lt;span style="color:#339999;"&gt;Program&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;static void&lt;/span&gt; Main(&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt;[] args)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#33ccff;"&gt;&lt;span style="color:#339999;"&gt;ClsSample&lt;/span&gt; &lt;span style="color:#000000;"&gt;ObjSample;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#339999;"&gt;ClsSOAP&lt;/span&gt; &lt;span style="color:#000000;"&gt;ObjSOAP;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;ObjSample&lt;/span&gt; &lt;span style="color:#000000;"&gt;=&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; &lt;span style="color:#339999;"&gt;ClsSample&lt;/span&gt;&lt;span style="color:#000000;"&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;ObjSample&lt;/span&gt;&lt;span style="color:#000000;"&gt;.ReAssignMemberValues();&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;ObjSOAP =&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; &lt;span style="color:#339999;"&gt;ClsSOAP&lt;/span&gt;&lt;span style="color:#000000;"&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;//Serialize&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;ObjSOAP.ToSoapSerialization(ObjSample, &lt;span style="color:#990000;"&gt;"c:\\SOAPSerialized.TXT"&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;ObjSample = &lt;span style="color:#3333ff;"&gt;null&lt;/span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;//Deserilize&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#339999;"&gt;ClsSample&lt;/span&gt; ObjDeseialSOAP;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;ObjDeseialSOAP = (&lt;span style="color:#339999;"&gt;ClsSample&lt;/span&gt;)ObjSOAP.FromSoapSerialization(&lt;span style="color:#cc0000;"&gt;"c:\\SOAPSerialized.TXT"&lt;/span&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;ObjDeseialSOAP.DisplayMemberValueAfterDeSerialization();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;Output:&lt;/span&gt; &lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;Private member value is 20&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;Public member value is Twenty&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;Here both private and public members are serialized&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-7673269886782606046?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/7673269886782606046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=7673269886782606046' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7673269886782606046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7673269886782606046'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/types-of-serialization-in-net.html' title='SOAP Serialization in .NET'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-6391871400273653794</id><published>2009-07-24T21:13:00.006+05:30</published><updated>2009-07-26T14:13:43.801+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER 2005'/><title type='text'>ROLLUP in Sql Server</title><content type='html'>&lt;div&gt;it is used to Summarizing Data..&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;The ROLLUP operator is useful in generating reports that contain subtotals and totals. The ROLLUP operator generates a result set that is similar to the result sets generated by the CUBE operator.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;ROLLUP generates a result set that shows aggregates for a hierarchy of values in the selected columns.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;Checkout this example..&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="color:#3333ff;"&gt;Create Table&lt;/span&gt; Student&lt;br /&gt;(&lt;br /&gt;StudentID &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt;,&lt;br /&gt;Student_Name &lt;span style="color:#3333ff;"&gt;Varchar&lt;/span&gt;(15),&lt;br /&gt;SubjectName &lt;span style="color:#3333ff;"&gt;Varchar&lt;/span&gt;(15),&lt;br /&gt;Marks_Scored &lt;span style="color:#3333ff;"&gt;numeric&lt;/span&gt;(18,1)&lt;br /&gt;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(1,&lt;span style="color:#ff0000;"&gt;'Babu'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'Tamil'&lt;/span&gt;,90)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(1,&lt;span style="color:#ff0000;"&gt;'Babu'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'English'&lt;/span&gt;,78)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(1,&lt;span style="color:#ff0000;"&gt;'Babu'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'Maths'&lt;/span&gt;,88)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(1,&lt;span style="color:#ff0000;"&gt;'Babu'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'Science'&lt;/span&gt;,88)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(1,&lt;span style="color:#ff0000;"&gt;'Babu'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'Social&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Science'&lt;/span&gt;,92)&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(2,&lt;span style="color:#ff0000;"&gt;'Ramesh'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'Tamil'&lt;/span&gt;,92)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(2,&lt;span style="color:#ff0000;"&gt;'Ramesh'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'English'&lt;/span&gt;,88)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(2,&lt;span style="color:#ff0000;"&gt;'Ramesh'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'Maths'&lt;/span&gt;,98)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(2,&lt;span style="color:#ff0000;"&gt;'Ramesh'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'Science'&lt;/span&gt;,99)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(2,&lt;span style="color:#ff0000;"&gt;'Ramesh'&lt;/span&gt;, &lt;span style="color:#ff0000;"&gt;'Social&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Science'&lt;/span&gt;,90)&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(3,'ram', &lt;span style="color:#ff0000;"&gt;'Tamil'&lt;/span&gt;,65)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3366ff;"&gt;Values&lt;/span&gt;(3,'Ram', &lt;span style="color:#ff0000;"&gt;'English'&lt;/span&gt;,68)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(3,'Ram', &lt;span style="color:#ff0000;"&gt;'Maths'&lt;/span&gt;,88)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(3,'Ram', &lt;span style="color:#ff0000;"&gt;'Science'&lt;/span&gt;,59)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Insert into&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;Values&lt;/span&gt;(3,'Ram', &lt;span style="color:#ff0000;"&gt;'Social Science'&lt;/span&gt;,60)&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;select&lt;/span&gt; Student_Name,&lt;span style="color:#ff0000;"&gt;Sum&lt;/span&gt;(Marks_Scored) &lt;span style="color:#3333ff;"&gt;as&lt;/span&gt; Total&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;from&lt;/span&gt; Student&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;group by&lt;/span&gt; Student_Name&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;with rollup&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5362062692722140082" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 228px; CURSOR: hand; HEIGHT: 198px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmnfnA8T47I/AAAAAAAAACU/0RLjK9UPr_c/s400/rollup1.bmp" border="0" /&gt; &lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#3333ff;"&gt;Select&lt;/span&gt;&lt;br /&gt;(&lt;span style="color:#3333ff;"&gt;Case When&lt;/span&gt; (&lt;span style="color:#cc33cc;"&gt;Grouping&lt;/span&gt;(Student_Name)=1) &lt;span style="color:#3333ff;"&gt;Then&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;'G&lt;/span&gt;.&lt;span style="color:#ff0000;"&gt;Total'&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;Else&lt;/span&gt; Student_Name End)&lt;span style="color:#3333ff;"&gt;as&lt;/span&gt; Student_Name,&lt;br /&gt;(&lt;span style="color:#3333ff;"&gt;Case When&lt;/span&gt; (&lt;span style="color:#cc33cc;"&gt;Grouping&lt;/span&gt;(SubjectName)=1) &lt;span style="color:#3333ff;"&gt;Then&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;'Total'&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;Else&lt;/span&gt; SubjectName End)&lt;span style="color:#3333ff;"&gt;as&lt;/span&gt; SubjectName,&lt;br /&gt;&lt;span style="color:#cc33cc;"&gt;Sum&lt;/span&gt;(Marks_Scored) &lt;span style="color:#3333ff;"&gt;as&lt;/span&gt; Total&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;from&lt;/span&gt; Student &lt;span style="color:#3333ff;"&gt;group by&lt;/span&gt; Student_Name, SubjectName &lt;span style="color:#3333ff;"&gt;with rollup&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="color:#3333ff;"&gt;&lt;/div&gt;&lt;/span&gt;&lt;img id="BLOGGER_PHOTO_ID_5362062023982360882" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 281px; CURSOR: hand; HEIGHT: 400px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_3NZnKv5E_Ak/SmnfAFsUqTI/AAAAAAAAACM/q4LBPSB_JgE/s400/rollup2.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;Note :&lt;/span&gt;it will run sqlserver2005 and above&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-6391871400273653794?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/6391871400273653794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=6391871400273653794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6391871400273653794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6391871400273653794'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/rollup-in-sql-server.html' title='ROLLUP in Sql Server'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmnfnA8T47I/AAAAAAAAACU/0RLjK9UPr_c/s72-c/rollup1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-5396156738914315731</id><published>2009-07-24T20:48:00.005+05:30</published><updated>2009-07-26T14:14:13.198+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER 2005'/><title type='text'>Serial Number using ROW_NUMBER (Transact-SQL)</title><content type='html'>Serial No is possible for your table using ROW_NUMBER&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;ROW_NUMBER&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition.&lt;br /&gt;&lt;br /&gt;Check out this Example&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;create table&lt;/span&gt; myTable&lt;br /&gt;(&lt;br /&gt;intNo &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt;,&lt;br /&gt;fname &lt;span style="color:#3333ff;"&gt;varchar&lt;/span&gt;(200),&lt;br /&gt;mark &lt;span style="color:#3333ff;"&gt;numeric&lt;/span&gt;(5,2)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; mytable &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(1,&lt;span style="color:#ff0000;"&gt;'xyz'&lt;/span&gt;,89.45)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; mytable &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(2,&lt;span style="color:#ff0000;"&gt;'xyz1'&lt;/span&gt;,93.45)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; mytable &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(3,&lt;span style="color:#ff0000;"&gt;'xyz2'&lt;/span&gt;,35.45)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; mytable &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(4,&lt;span style="color:#ff0000;"&gt;'xyz3'&lt;/span&gt;,88.45)&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; mytable &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt;(5,&lt;span style="color:#ff0000;"&gt;'xyz4'&lt;/span&gt;,73.45)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;select&lt;/span&gt; &lt;span style="color:#cc33cc;"&gt;ROW_NUMBER()&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;OVER&lt;/span&gt;(&lt;span style="color:#3333ff;"&gt;ORDER BY&lt;/span&gt; mark &lt;span style="color:#3333ff;"&gt;DESC&lt;/span&gt;) &lt;span style="color:#3333ff;"&gt;AS&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; 'Row Number'&lt;/span&gt; ,intNo,&lt;br /&gt;fname,mark &lt;span style="color:#3333ff;"&gt;from&lt;/span&gt; MyTable&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;output&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5362049809815937682" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 256px; CURSOR: hand; HEIGHT: 149px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmnT5IYHopI/AAAAAAAAAB8/WYfZPsgez6I/s400/resultwin.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Note:&lt;/span&gt;it will run in sql server 2005 and above...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-5396156738914315731?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/5396156738914315731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=5396156738914315731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5396156738914315731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5396156738914315731'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/serial-number-using-rownumber-transact.html' title='Serial Number using ROW_NUMBER (Transact-SQL)'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmnT5IYHopI/AAAAAAAAAB8/WYfZPsgez6I/s72-c/resultwin.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-1203381120235270651</id><published>2009-07-23T21:39:00.017+05:30</published><updated>2009-07-26T18:44:07.744+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER 2005'/><title type='text'>Difference between MSDE and SQL Server Express 2005</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;SQL SERVER Express&lt;/strong&gt; edition is a &lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;cut down version of&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;SQL SERVER 2005&lt;/strong&gt;&lt;/span&gt; and the next evolution of &lt;strong&gt;MSDE&lt;/strong&gt;(MSDE is a &lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;cut down version of&lt;/span&gt; &lt;/span&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;SQL Server 2000&lt;/span&gt;&lt;/strong&gt;).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;MSDE maximum database size is &lt;span style="color:#ff0000;"&gt;2GB&lt;/span&gt; but in SQL SERVER Express has around &lt;span style="color:#ff0000;"&gt;4GB&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;In terms of programming language support MSDE has only TSQL, but SQLSERVER Express has &lt;span style="color:#ff0000;"&gt;TSQL and .NET&lt;/span&gt;. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;SQL SERVER Express does not have &lt;span style="color:#ff0000;"&gt;connection limitation&lt;/span&gt;, which MSDE had and was controlled through the &lt;a style="TEXT-DECORATION: none" href="http://dynamic-coding.blogspot.com/2009/07/sql-server-2000-workload-governer.html"&gt;&lt;span style="color:#000066;"&gt;Workload governer&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000099;"&gt;.&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;There was&lt;span style="color:#000000;"&gt; no&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; &lt;/span&gt;&lt;a style="TEXT-DECORATION: none" href="http://msdn.microsoft.com/en-us/library/ms165716.aspx"&gt;&lt;span style="color:#000066;"&gt;XCOPY&lt;/span&gt;&lt;/a&gt; support for MSDE, SQL SERVER Express has it. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;DTS is not present in SQL SERVER express while MSDE has it. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;SQL SERVER Express has reporting services while MSDE does not.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;SQL SERVER Express has native XML support and MSDE does not. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-1203381120235270651?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/1203381120235270651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=1203381120235270651' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1203381120235270651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1203381120235270651'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/difference-between-msde-and-sql-server_23.html' title='Difference between MSDE and SQL Server Express 2005'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-7479605132163327326</id><published>2009-07-23T19:26:00.004+05:30</published><updated>2009-07-23T19:33:14.779+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><title type='text'>Database restore from SQL Server 7 ,SQL Server 2000 to SQL Server 2005</title><content type='html'>it is possible to restore database from  sql server 7, sql server 2000 to sql server 2005.&lt;br /&gt;it can be achieved by using &lt;span style="color:#ff0000;"&gt;restore &lt;/span&gt;and &lt;span style="color:#ff0000;"&gt;with replace&lt;/span&gt; command&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;use master &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;restore database&lt;/span&gt; mydatabase &lt;span style="color:#3333ff;"&gt;from disk&lt;/span&gt; =&lt;span style="color:#ff0000;"&gt;'c:\mybackup.bak'&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;with&lt;/span&gt; &lt;span style="color:#cc33cc;"&gt;replace&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-7479605132163327326?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/7479605132163327326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=7479605132163327326' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7479605132163327326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7479605132163327326'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/database-restore-from-sql-server-7-sql.html' title='Database restore from SQL Server 7 ,SQL Server 2000 to SQL Server 2005'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-3819648915988600223</id><published>2009-07-23T19:12:00.004+05:30</published><updated>2009-07-23T19:40:11.879+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><title type='text'>Sql Server – Backup and Restore Database using SQL Script (T-SQL)</title><content type='html'>it is easy to take backup in sql server using script without any External tools.&lt;br /&gt;By SIMPLE ways.. as follows...&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;use master&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;create database&lt;/span&gt; mydatabase&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;backup database&lt;/span&gt; mydatabase&lt;span style="color:#3333ff;"&gt; to disk&lt;/span&gt; =&lt;span style="color:#ff0000;"&gt;'c:\mybackup.bak'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Yeah,i can be easily restore by simple steps...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;use master&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;restore database&lt;/span&gt; mydatabase &lt;span style="color:#3333ff;"&gt;from disk&lt;/span&gt; =&lt;span style="color:#ff0000;"&gt;'c:\mybackup.bak'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;thats all..&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-3819648915988600223?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/3819648915988600223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=3819648915988600223' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3819648915988600223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3819648915988600223'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/sql-server-backup-and-restore-database.html' title='Sql Server – Backup and Restore Database using SQL Script (T-SQL)'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-6684450001107311859</id><published>2009-07-21T22:09:00.006+05:30</published><updated>2009-07-21T22:57:35.297+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Parameter types in C# (Value,out,ref and params)</title><content type='html'>&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Value parameters:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Value parameter is also called In parameter. A parameter declared with no modifiers is a&lt;br /&gt;value parameter. Methods are permitted to assign new values to a value parameter. Such assignments only affect the local storage location and it has no effect on the actual argument given in the method invocation.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;static void&lt;/span&gt; ParamMethod(&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; Param1)&lt;br /&gt;{&lt;br /&gt;Param1 = 100;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;static void&lt;/span&gt; Main()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; Paravalue = 10;&lt;br /&gt;ParamMethod(Paravalue);&lt;br /&gt;&lt;span style="color:#00cccc;"&gt;Console&lt;/span&gt;.WriteLine(Paravalue);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Here the output is 10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Reference Parameter:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Reference parameter declared with a ref modifier. It does not make a new storage location. Instead, a reference parameter represents the same storage location as the variable given as the argument in the method invocation. It should &lt;span style="color:#ff0000;"&gt;assigned to some value&lt;/span&gt; before it go for the method invocation.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;static void&lt;/span&gt; ParamMethod(&lt;span style="color:#3333ff;"&gt;ref int&lt;/span&gt; Param1)&lt;br /&gt;{&lt;br /&gt;Param1 = 100;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;static void&lt;/span&gt; Main()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; Paravalue = 10; &lt;span style="color:#009900;"&gt;//Here Paravalue should assign&lt;/span&gt;&lt;br /&gt;ParamMethod(&lt;span style="color:#3333ff;"&gt;ref&lt;/span&gt; Paravalue);&lt;br /&gt;&lt;span style="color:#00cccc;"&gt;Console&lt;/span&gt;.WriteLine(Paravalue);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Here the output is 100&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Output parameters:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Output parameter declared with an out. Similar to a reference parameter, an output parameter does not create a new storage location. Instead, an output parameter represents the same storage location as the variable given as the argument in the method invocation.&lt;span style="color:#ff0000;"&gt;Every output parameter of a method must be definitely assigned before the method returns&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;static void&lt;/span&gt; ParamMethod(&lt;span style="color:#3333ff;"&gt;out int&lt;/span&gt; Param1)&lt;br /&gt;{&lt;br /&gt;Param1 = 100; &lt;span style="color:#009900;"&gt;//Here Param1 should assign&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;static void&lt;/span&gt; Main()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; Paravalue ;&lt;br /&gt;ParamMethod(&lt;span style="color:#3333ff;"&gt;out&lt;/span&gt; Paravalue);&lt;br /&gt;&lt;span style="color:#00cccc;"&gt;Console&lt;/span&gt;.WriteLine(Paravalue);&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Here the output is 100&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Params:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The value passed for a "params" parameter can be either comma separated value list or a single dimensional array. "params" parameters are input only.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;static int&lt;/span&gt; Summation(&lt;span style="color:#3333ff;"&gt;params int&lt;/span&gt;[] Param1)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; Sum =0;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;foreach&lt;/span&gt;(&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; P &lt;span style="color:#3333ff;"&gt;in&lt;/span&gt; Param1)&lt;br /&gt;{&lt;br /&gt;Sum = Sum +P;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;return&lt;/span&gt; Sum ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;static void&lt;/span&gt; Main()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#00cccc;"&gt;Console&lt;/span&gt;.WriteLine(Summation(1,2,3));&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Here the output is 6&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-6684450001107311859?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/6684450001107311859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=6684450001107311859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6684450001107311859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6684450001107311859'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/parameters-type-in-c-valueoutref-and.html' title='Parameter types in C# (Value,out,ref and params)'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-5169670790590871562</id><published>2009-07-19T22:02:00.009+05:30</published><updated>2009-07-25T13:51:00.333+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serilization'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Serailization in .NET</title><content type='html'>&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Serialization:&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;Serialization is the process of saving the state of an object in a persistent storage media in the form of linear stream of bytes. The object can be stored to a file, a database or even in the memory. Serialization in .NET is provided by the System.Runtime.Serialization namespace.&lt;br /&gt;&lt;br /&gt;In order for a class to be serializable, it must have the attribute SerializableAttribute set&lt;br /&gt;and all its members must also be serializable, except if they are ignored with the attribute NonSerializedAttribute. However, the private and public members of a class are always serialized by default. The SerializationAttribute is only used for the binary serialization.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;[&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#339999;"&gt;Serializable&lt;/span&gt;&lt;span style="color:#000000;"&gt;]&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;public class&lt;/span&gt; Student&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;private int&lt;/span&gt; &lt;span style="color:#000000;"&gt;StudentID;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;public string&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;StudentName;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;public void&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;dispaly()&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#339999;"&gt;Console&lt;/span&gt;.&lt;span style="color:#000000;"&gt;WriteLine&lt;/span&gt;&lt;span style="color:#000000;"&gt;("&lt;/span&gt;Student Name &lt;span style="color:#000000;"&gt;"+&lt;/span&gt; &lt;span style="color:#000000;"&gt;StudentName&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;span style="color:#000000;"&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Binary Serialization:&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In Binary serialization the entire object state is saved. Both public and private members states are saved.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//The following way Student object is serialized&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;public void&lt;/span&gt; &lt;span style="color:#000000;"&gt;BinarySerialize(&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; &lt;span style="color:#000000;"&gt;filename,&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;Student&lt;/span&gt; &lt;span style="color:#000000;"&gt;Stud&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{&lt;br /&gt;FileStream fileStreamObject;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;try &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{&lt;br /&gt;fileStreamObject =&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; &lt;span style="color:#000000;"&gt;FileStream(filename, FileMode.Create);&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;BinaryFormatter binaryFormatter =&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; &lt;span style="color:#000000;"&gt;BinaryFormatter();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;binaryFormatter.Serialize(fileStreamObject, Stud);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;finally&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;{&lt;br /&gt;fileStreamObject.Close();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//The following way Deserialize the Student Object&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;public static object&lt;/span&gt; BinaryDeserialize(&lt;span style="color:#3333ff;"&gt;string&lt;/span&gt; filename)&lt;br /&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;FileStream fileStreamObject;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;try&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;fileStreamObject =&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; &lt;span style="color:#000000;"&gt;FileStream(filename, FileMode.Open);&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;BinaryFormatter binaryFormatter =&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; &lt;span style="color:#000000;"&gt;BinaryFormatter();&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;return&lt;/span&gt; &lt;span style="color:#000000;"&gt;(binaryFormatter.Deserialize(fileStreamObject));&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;finally&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;{&lt;br /&gt;fileStreamObject.Close();&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Serialization is used to transportation of an object through a network.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-5169670790590871562?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/5169670790590871562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=5169670790590871562' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5169670790590871562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5169670790590871562'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/serailization-in-net.html' title='Serailization in .NET'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-5677418314771893741</id><published>2009-07-18T14:19:00.004+05:30</published><updated>2009-07-23T19:11:58.781+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Crystal Report'/><category scheme='http://www.blogger.com/atom/ns#' term='Fix/Solution'/><title type='text'>How to Fix cross mark in Crystal report while exporting to Excel</title><content type='html'>In your application, while exporting crystal report to Excel your getting cross mark in spite of image.Like this&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5359721180350891586" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 77px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmGOBDnzxkI/AAAAAAAAAB0/rkLPYXfHFF4/s400/excel.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Problem is not in the crystal report.Dont waste time your in Crystal report.&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;Solution is in your Business logic,check your size of the image/bitmap. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;Ensure image height and width are same before exporting to crystal report.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;it is working for me..Enjoy it..&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-5677418314771893741?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/5677418314771893741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=5677418314771893741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5677418314771893741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5677418314771893741'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/how-to-fix-cross-mark-in-crystal-report.html' title='How to Fix cross mark in Crystal report while exporting to Excel'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmGOBDnzxkI/AAAAAAAAAB0/rkLPYXfHFF4/s72-c/excel.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-1343648387853159795</id><published>2009-07-17T20:29:00.010+05:30</published><updated>2009-07-17T21:01:25.938+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Explorer'/><category scheme='http://www.blogger.com/atom/ns#' term='Fix/Solution'/><category scheme='http://www.blogger.com/atom/ns#' term='Blogspot'/><title type='text'>How to Fix/Solution for Internet Explorer cannot open the Internet site and operation aborted in Blog</title><content type='html'>In blog, your getting message like this Internet Explorer cannot open the internet site with following links and operation aborted...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5359446827552877362" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 118px; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmCUfnziKzI/AAAAAAAAABU/fyGq0kWgJDA/s400/err1.bmp" border="0" /&gt; Check out your Blog spot settings, where your &lt;span style="color:#ff0000;"&gt;Comment form placement&lt;/span&gt; in your blog. If it is Embedded below post like this...&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5359448943882665330" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 62px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmCWazv3_XI/AAAAAAAAABk/sA-bzpnTYaw/s400/emb.bmp" border="0" /&gt;Solution is simply and Easy,Change it Embedded below post to Full page. &lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5359449740507485810" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 73px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SmCXJLaCFnI/AAAAAAAAABs/a6MVA32_JlE/s400/full.bmp" border="0" /&gt; &lt;p&gt;&lt;/p&gt;&lt;p&gt;it is working...&lt;/p&gt;&lt;br /&gt;ahhahhha...Enjoy it...&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-1343648387853159795?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/1343648387853159795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=1343648387853159795' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1343648387853159795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1343648387853159795'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/how-to-fixsolution-for-internet.html' title='How to Fix/Solution for Internet Explorer cannot open the Internet site and operation aborted in Blog'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_3NZnKv5E_Ak/SmCUfnziKzI/AAAAAAAAABU/fyGq0kWgJDA/s72-c/err1.bmp' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1659674788540926262.post-2831162971009810924</id><published>2009-07-12T13:57:00.033+05:30</published><updated>2009-07-14T21:09:49.481+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript-getElementById'/><title type='text'>How to Call Javascript function through CodeBehind(C#)</title><content type='html'>Yeah,It is easy to Call javascript function through codebehind by using&lt;br /&gt;Attributes.Add to the button.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;use this code..&lt;/p&gt;&lt;div style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: black 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; OVERFLOW: auto; BORDER-LEFT: black 1px solid; WIDTH: 600px; PADDING-TOP: 10px; BORDER-BOTTOM: black 1px solid; HEIGHT: 25px"&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;Button1.Attributes.Add&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#cc0000;"&gt;"onclick", "return callingfn()"&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;Consider javascript as follows&lt;br /&gt;&lt;/p&gt;&lt;div style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: black 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; OVERFLOW: auto; BORDER-LEFT: black 1px solid; WIDTH: 600px; PADDING-TOP: 10px; BORDER-BOTTOM: black 1px solid; HEIGHT: 275px"&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;script  defer="defer" type=&lt;span style="color:#3333ff;"&gt;"text/javascript"&lt;/span&gt; language=&lt;span style="color:#3333ff;"&gt;"javascript"&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;function &lt;/span&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;callingfn()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;var&lt;/span&gt; &lt;span style="color:#000000;"&gt;objTextBox = document.getElementById(&lt;/span&gt;'TextBox2');&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;objTextBox.value =&lt;/span&gt; "123";&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;return&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;objTextBox.value();&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#333333;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;&amp;lt;&lt;/span&gt;/script&lt;span style="color:#000000;"&gt;&amp;gt;&lt;/span&gt; &lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;whole code like this.. &lt;p&gt;&lt;/p&gt;&lt;div style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: black 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; OVERFLOW: auto; BORDER-LEFT: black 1px solid; WIDTH: 600px; PADDING-TOP: 10px; BORDER-BOTTOM: black 1px solid; HEIGHT: 1050px"&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;/p&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;html &lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;head runat=&lt;span style="color:#3333ff;"&gt;"server"&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;title&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; Untitled Page&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;/title&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;script defer="defer" type=&lt;span style="color:#3333ff;"&gt;"text/javascript"&lt;/span&gt; language=&lt;span style="color:#3333ff;"&gt;"javascript"&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;function&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;callingfn()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;var &lt;/span&gt;&lt;span style="color:#000000;"&gt;objTextBox = document.getElementById&lt;/span&gt;('TextBox2');&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;objTextBox.value =&lt;/span&gt; "123"&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;return&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;objTextBox.value();&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;head&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;body&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;form id=&lt;span style="color:#3333ff;"&gt;"form1"&lt;/span&gt; runat=&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;"server&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;"&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;table&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;tr&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;td&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;asp:TextBox ID=&lt;span style="color:#3333ff;"&gt;"TextBox2"&lt;/span&gt; runat=&lt;span style="color:#3333ff;"&gt;"server"&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;&amp;gt; &amp;lt;/&lt;/span&gt;asp:TextBox&amp;gt; &lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;span style="color:#ff0000;"&gt;td&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;tr&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;tr&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;td align =&lt;span style="color:#3333ff;"&gt;"center"&amp;gt; &amp;lt;&lt;/span&gt;asp:Button ID="&lt;span style="color:#3333ff;"&gt;Button1&lt;/span&gt;" runat=&lt;span style="color:#3333ff;"&gt;"server" &lt;/span&gt;Text=&lt;span style="color:#3333ff;"&gt;"Button"&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#3333ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;td&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;tr&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;table&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;form&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;body&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;html&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;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/1659674788540926262-2831162971009810924?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/2831162971009810924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=2831162971009810924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2831162971009810924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2831162971009810924'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/how-to-call-javascript-function-through.html' title='How to Call Javascript function through CodeBehind(C#)'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-4290060776820285594</id><published>2009-07-06T21:52:00.005+05:30</published><updated>2009-07-11T18:14:48.752+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><title type='text'>SQL Server 2000 Workload Governer</title><content type='html'>&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Workload governor&lt;/span&gt; limits the performance of &lt;span style="color:#ff0000;"&gt;MSDE&lt;/span&gt; if the SQL engine receives more load than limit of MSDE(8 Cuncurrent connection).&lt;br /&gt;&lt;br /&gt;Workload governor sits between the client and the database engine and counts the number of connections per database instance. If Workload governor finds that the number of connections exceeds eight connections, it starts stalling the connections and slowing down the database engine.&lt;br /&gt;&lt;br /&gt;It does not &lt;span style="color:#ff0000;"&gt;limit the number of connections&lt;/span&gt; but makes the connection request go slow. By default &lt;span style="color:#ff0000;"&gt;32,767&lt;/span&gt; connections are allowed both for &lt;span style="color:#ff0000;"&gt;SQL SERVER and MSDE&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-4290060776820285594?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/4290060776820285594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=4290060776820285594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/4290060776820285594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/4290060776820285594'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/sql-server-2000-workload-governer.html' title='SQL Server 2000 Workload Governer'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-6779971205860506784</id><published>2009-07-06T21:02:00.010+05:30</published><updated>2009-07-06T22:34:10.750+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><title type='text'>Difference between MSDE and SQL Server 2000</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;MSDE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;(Microsoft Desktop Engine):&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;MSDE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is a &lt;span style="color:#ff0000;"&gt;cut down&lt;/span&gt; version of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;SQL&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; SERVER database and &lt;span style="color:#ff0000;"&gt;free, &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;redistributable&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; software.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Differences:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#666666;"&gt;A.Size:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;In &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;MSDE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; database size limited to &lt;span style="color:#ff0000;"&gt;2GB&lt;/span&gt;.&lt;br /&gt;In &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;SQL&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; Server database size limited to &lt;span style="color:#ff0000;"&gt;1,048,516 TB1&lt;/span&gt;(1 Billion GB).&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#666666;"&gt;B.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;Performance&lt;/span&gt;&lt;/span&gt;:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;Performance&lt;/span&gt;&lt;/span&gt; of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;MSDE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; degrades when maximum number of concurrent operations &lt;span style="color:#ff0000;"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_9"&gt;greater then&lt;/span&gt;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;or equal to 8.&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;Performance&lt;/span&gt; degradation is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_11"&gt;implemented&lt;/span&gt; with the help of &lt;span style="color:#ff0000;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;SQL&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; SERVER 2000&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;workload governor&lt;/span&gt;. &lt;/p&gt;&lt;p&gt;In &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;SQL&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; SERVER 2000, possible number of concurrent connections are &lt;span style="color:#ff0000;"&gt;32,767&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#666666;"&gt;C.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;OLAP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and Data warehousing:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;MSDE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; does not provide &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;OLAP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and Data warehousing &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_17"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_14"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;capabilities&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#666666;"&gt;D.Mail:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;MSDE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; does not have support facility for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;SQL&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; mail.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#666666;"&gt;E.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_17"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_15"&gt;Administrative&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; Tools:&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;MSDE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; doesn't have its own &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_22"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_19"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_17"&gt;administrative&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; tools. There are many third party tools, which provide &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_23"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_20"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_18"&gt;administrative&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; capability GUI. &lt;/p&gt;&lt;p&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;SQL&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; Server have &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_25"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_22"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_20"&gt;administrative&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; tools such as enterprise manager, Query analyzer or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;Profiler&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Ref : &lt;a href="http://www.codeproject.com/"&gt;www.codeproject.com/&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-6779971205860506784?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/6779971205860506784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=6779971205860506784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6779971205860506784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6779971205860506784'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/difference-between-msde-and-sql-server.html' title='Difference between MSDE and SQL Server 2000'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-1380465917368050981</id><published>2009-07-05T14:17:00.010+05:30</published><updated>2009-07-10T23:05:13.204+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>How to Filter Window Message in .NET</title><content type='html'>&lt;strong&gt;Message Filter:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Message filter to prevent specific events from being raised to the control or Forms.&lt;br /&gt;&lt;br /&gt;We can achieve the Message Filter through &lt;span style="color:#ff0000;"&gt;IMessageFilter&lt;/span&gt; Interface. It has overridable method name &lt;span style="color:#ff0000;"&gt;P&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;reMessageFilter&lt;/span&gt;.Using this method we can customize our Message Filters.&lt;br /&gt;&lt;br /&gt;Example : Filter/Restrict left mouse button down message&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public class MyMsgFilter : IMessageFilter &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public bool PreFilterMessage(ref Message m) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#009900;"&gt;// Filter/Restrict left mouse button down message.&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;if (m.Msg == 513) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;return true; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;return false; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order to monitor the Message Filter in our application you must register Filter class in your application.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public class mainForm : System.Windows.Forms.Form&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;private MyMsgFilter msgFilter = new MyMsgFilter(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public mainForm() &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;// Add message filter. &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Application.AddMessageFilter(msgFilter); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;Following way you can remove your Message Filter&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Application.RemoveMessageFilter(msgFilter);&lt;/span&gt;&lt;span style="color:#ff0000;"&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-1380465917368050981?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/1380465917368050981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=1380465917368050981' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1380465917368050981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1380465917368050981'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/07/how-to-filterrestrict-window-message.html' title='How to Filter Window Message in .NET'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-3593923881416451223</id><published>2009-06-21T15:06:00.011+05:30</published><updated>2009-07-14T21:10:57.634+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript-getElementById'/><title type='text'>JavaScript document.getElementById</title><content type='html'>If you want to quickly access the value of an HTML input give it an id to make your life a lot easier.&lt;br /&gt;This small script below will check to see if there is any text in the text field "myText". The argument that getElementById requires is the id of the HTML element you wish to utilize&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="BORDER-RIGHT: #eee 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #eee 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; OVERFLOW: auto; BORDER-LEFT: #eee 1px solid; WIDTH: 600px; PADDING-TOP: 10px; BORDER-BOTTOM: #eee 1px solid; HEIGHT: 444px"&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;script defer="defer" type&lt;span style="color:#3333ff;"&gt;="&lt;/span&gt;text/javascript&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;"&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;function&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;notEmpty()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;var&lt;/span&gt; &lt;span style="color:#000000;"&gt;myTextField = document.getElementById&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;'myText'&lt;/span&gt;&lt;span style="color:#000000;"&gt;);&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;if&lt;/span&gt;(&lt;span style="color:#000000;"&gt;myTextField.value !=&lt;/span&gt; "") &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;alert("&lt;/span&gt;You entered: &lt;/span&gt;&lt;span style="color:#000000;"&gt;" + myTextField.value)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3333ff;"&gt;else&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;alert("&lt;/span&gt;Would you please enter some text?&lt;/span&gt;&lt;span style="color:#000000;"&gt;") &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;input type=&lt;span style="color:#3333ff;"&gt;'text'&lt;/span&gt; id=&lt;/span&gt;&lt;span style="color:#339999;"&gt;&lt;span style="color:#3333ff;"&gt;'myText'&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#3333ff;"&gt;/&amp;gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;input type=&lt;span style="color:#3333ff;"&gt;'button'&lt;/span&gt; onclick=&lt;span style="color:#3333ff;"&gt;'notEmpty()'&lt;/span&gt; value=&lt;span style="color:#3333ff;"&gt;'Form Checker'&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#3333ff;"&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&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/1659674788540926262-3593923881416451223?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/3593923881416451223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=3593923881416451223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3593923881416451223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3593923881416451223'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/06/javascript-documentgetelementbyid.html' title='JavaScript document.getElementById'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-8563442156073088483</id><published>2009-06-14T19:39:00.003+05:30</published><updated>2009-06-14T19:55:11.053+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Difference between Abstraction and Encapsulation</title><content type='html'>&lt;strong&gt;&lt;span style="color:#000000;"&gt;Abstraction:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;It is &lt;span style="color:#ff0000;"&gt;virtual&lt;/span&gt; class design.&lt;br /&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;Representation&lt;/span&gt; of data that how we represent it.&lt;br /&gt;Before actually defining class developer will think about about the properties, methods and events will be there in class.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Encapsulation:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Hiding&lt;/span&gt; of &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;unnecessary&lt;/span&gt; data.&lt;br /&gt;At the time of class definition &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;developers&lt;/span&gt; will think about which should display to end user and which should not.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Conclusion:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;Abstraction&lt;/span&gt; is collection of data and Encapsulation is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;exposure&lt;/span&gt; of data in appropriate access specifier.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-8563442156073088483?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/8563442156073088483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=8563442156073088483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/8563442156073088483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/8563442156073088483'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/06/difference-between-abstraction-and.html' title='Difference between Abstraction and Encapsulation'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-6917493151441524356</id><published>2009-06-09T21:27:00.006+05:30</published><updated>2009-06-09T22:00:46.836+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><title type='text'>Difference between Rule and Check Constraint</title><content type='html'>&lt;strong&gt;Check Constraint:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Check constraint is associated with columns in a Table. So these can't be re-used.&lt;br /&gt;&lt;br /&gt;Suppose if "Emp" table having the coulmn "Salary" then&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;alter table Emp add constraint ck_op Check (Salary between 15000 and 45000)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Rule:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Rules are defined with in a database and can be applied to any number of columns.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#333333;"&gt;Creating Rule:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;CREATE RULE SAL_RANGE&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;as&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;@Sal &gt; 15000 and @Sal &gt; 45000&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#333333;"&gt;Binding Rule to a Column:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;SP_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;BINDRULE&lt;/span&gt; 'SAL_RANGE','&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Emp&lt;/span&gt;.Salary'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-6917493151441524356?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/6917493151441524356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=6917493151441524356' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6917493151441524356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6917493151441524356'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/06/difference-between-rule-and-check.html' title='Difference between Rule and Check Constraint'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-3235723067547503841</id><published>2009-05-10T21:42:00.004+05:30</published><updated>2009-07-10T23:06:21.110+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Encapsulation</title><content type='html'>When designing a class, it is generally a good practice to only reveal the necessary interfaces needed to interact with the object, and hide the implementation details that are not precisely relevant. &lt;span style="color:#ff0000;"&gt;&lt;span style="color:#000000;"&gt;This&lt;/span&gt; hiding of details&lt;/span&gt; is known as encapsulation.&lt;br /&gt;&lt;br /&gt;The concept of encapsulation is better enforced with the definitions of &lt;span style="color:#ff0000;"&gt;interfaces&lt;/span&gt; and implementations. An interface is defined by the services of communication between objects. Classes declare some methods and properties as visible to outside objects, and hide the other details. The &lt;span style="color:#ff0000;"&gt;visible, or public&lt;/span&gt;, methods and properties become the &lt;span style="color:#ff0000;"&gt;interface to the object&lt;/span&gt;. Interfaces typically only include methods, since any need to access an attribute should be made available through a public method.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public class ClsEncapsulation&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;int SqrOutput;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public ClsEncapsulation()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Visible method&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public void AssignNumber(int GivenNumber)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;CalculateSqluare(GivenNumber);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public void Display()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Console.WriteLine("Square of given number is " + SqrOutput.ToString());&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Hiding Method&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;private void CalculateSqluare(int GnNumber)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;SqrOutput = System.Math.Pow(GnNumber,2);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-3235723067547503841?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/3235723067547503841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=3235723067547503841' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3235723067547503841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3235723067547503841'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/encapsulation.html' title='Encapsulation'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-8379307189164003138</id><published>2009-05-10T19:41:00.006+05:30</published><updated>2009-05-10T20:14:52.440+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Threading'/><title type='text'>Process Vs Thread</title><content type='html'>&lt;strong&gt;Process:&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Process is a &lt;span style="color:#ff0000;"&gt;heavy weight&lt;/span&gt; running instance of a program.&lt;/li&gt;&lt;li&gt;A Process has its own memory space, runtime enivorment and process ID. One process can have multiple threads(It has atleast &lt;span style="color:#ff0000;"&gt;one main thread&lt;/span&gt;).&lt;/li&gt;&lt;li&gt;Processes must use interprocess communication to communicate with silbing processes.&lt;/li&gt;&lt;li&gt;Process is an &lt;span style="color:#ff0000;"&gt;architectural&lt;/span&gt; construct.&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Thread:&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A thread is the &lt;span style="color:#ff0000;"&gt;smallest schedulable&lt;/span&gt; unit of execution in aWindows application.&lt;/li&gt;&lt;li&gt;A thread always is &lt;span style="color:#ff0000;"&gt;associated&lt;/span&gt; with a particular&lt;span style="color:#ff0000;"&gt; process.&lt;/span&gt;&lt;span style="color:#000000;"&gt;Threads runs the code inside the process and share the address space with other threads inside the process i.e share process handles.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Threads can directly communicate with other threads of its process.&lt;/li&gt;&lt;li&gt;Thread is &lt;span style="color:#ff0000;"&gt;coding&lt;/span&gt; construct.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-8379307189164003138?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/8379307189164003138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=8379307189164003138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/8379307189164003138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/8379307189164003138'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/process-vs-thread.html' title='Process Vs Thread'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-8106294879254276519</id><published>2009-05-10T09:20:00.000+05:30</published><updated>2009-05-10T09:32:56.619+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><title type='text'>Assembly Vs Namespace</title><content type='html'>&lt;strong&gt;Assembly:&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned, and deployed as a single implementation unit (as one or more files). It's a managed dll or exe (built by .NET).Assemblies are Self-Describing. [e.g. metadata,manifest] &lt;/li&gt;&lt;li&gt;One assembly can contain &lt;span style="color:#ff0000;"&gt;several namespaces&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;Namespace: &lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A group of managed types (classes, enums, structs, etc). It form the logical boundary for a Group of classes.&lt;/li&gt;&lt;li&gt;One namespace can contain types(&lt;span style="color:#ff0000;"&gt;Objects&lt;/span&gt;) from different assemblies.&lt;/li&gt;&lt;li&gt;The &lt;span style="color:#ff0000;"&gt;name of the namespace&lt;/span&gt; is not necessarily the &lt;span style="color:#ff0000;"&gt;name of the assembly&lt;/span&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-8106294879254276519?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/8106294879254276519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=8106294879254276519' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/8106294879254276519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/8106294879254276519'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/assembly-vs-namespace.html' title='Assembly Vs Namespace'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-3106062253002956238</id><published>2009-05-10T08:33:00.001+05:30</published><updated>2009-07-10T23:08:05.811+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Basics of .NET Namespace</title><content type='html'>Namespace are logical grouping of classes and other types such as unions, structures, interfaces and enumerators.&lt;br /&gt;&lt;br /&gt;In Microsoft .Net, every program is created with a default namespace. This default namespace is called as global namespace. But the program itself can declare any number of namespaces, each of them with a &lt;span style="color:#ff0000;"&gt;unique name&lt;/span&gt;. The advantage is that every namespace can contain any number of classes, functions, variables and also namespaces etc., whose names are unique only inside the namespace. The members with the&lt;span style="color:#ff0000;"&gt; same name&lt;/span&gt; can be created in &lt;span style="color:#ff0000;"&gt;some o&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;ther&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;namespace&lt;/span&gt; without any compiler complaints from Microsoft .Net.&lt;br /&gt;&lt;br /&gt;If a new project is created in Visual Studio .NET it automatically adds some global namespaces. These namespaces can be different in different projects. But each of them should be placed under the base namespace &lt;span style="color:#000000;"&gt;System.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;namespace Books&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;class Authors&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public void Display()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Console.WriteLine("Auther name is Dynamic-Coding");&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;br /&gt;&lt;/span&gt;This is simple namespace example. We can also build hierarchy of namespace. Here is an example for this.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;namespace Books&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;namespace Inventory&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;using System;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;class AddInventory&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public void MyMethod()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Console.WriteLine("Adding Inventory via MyMethod!");&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let's look how we can use the namespaces in our code&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;using Books;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;class HelloWorld&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public static void Main()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Inventory.AddInventory AddInv = new AddInventory();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;AddInv.MyMethod();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;using Books.Inventory;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;class HelloWorld&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public static void Main()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;AddInventory AddInv = new AddInventory();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;AddInv.MyMethod();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Note:&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;The namespaces &lt;span style="color:#ff0000;"&gt;wide opens&lt;/span&gt; the doors for 3rd party and project specific custom components and class libraries.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-3106062253002956238?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/3106062253002956238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=3106062253002956238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3106062253002956238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3106062253002956238'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/basics-of-namespace.html' title='Basics of .NET Namespace'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-2975664621918181355</id><published>2009-05-03T17:43:00.003+05:30</published><updated>2009-08-20T23:03:43.792+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='LINQ to Objects'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 3.5'/><title type='text'>Object filtering using LINQ</title><content type='html'>&lt;strong&gt;LINQ:&lt;/strong&gt;&lt;br /&gt;Query is an integrated feature of programming language(like C# and VB.NET).LINQ(Language Integrated query), a set of language extension that allows you to perform queries without leaving the comfort of programming language. It has set of keyword to build a query expression.These query expression can select,filter,sort,group and transform data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;LINQ to Objects:&lt;/strong&gt;&lt;br /&gt;It is Simplest form of LINQ, allow you to query collection of memory objects. It replace the iteration logic(such as foreach block) with declarative LINQ expression.LINQ using the new set of keywords, including from,in,where and select.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public class&lt;/span&gt; &lt;span style="color: rgb(51, 153, 153);"&gt;Car&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public &lt;/span&gt;Car&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;span style="color: rgb(51, 51, 255);"&gt;string &lt;/span&gt;m_Make,&lt;span style="color: rgb(51, 51, 255);"&gt;string &lt;/span&gt;m_Color,&lt;span style="color: rgb(51, 51, 255);"&gt;int &lt;/span&gt;m_Price)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Make = m_Make;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Color = m_Color;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Price = m_Price;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public string&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;Make {&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Color {&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public int&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;Price {&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;get&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;set&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; }&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;public class&lt;/span&gt; &lt;span style="color: rgb(51, 153, 153);"&gt;LinQApp&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;static void&lt;/span&gt; Main(&lt;span style="color: rgb(51, 51, 255);"&gt;string&lt;/span&gt;[] args)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ListFiltering();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Console&lt;/span&gt;.ReadLine();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;private static void&lt;/span&gt; ListFiltering()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;List&lt;/span&gt;&lt;car&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 153, 153);"&gt; &lt;/span&gt;Cars = &lt;span style="color: rgb(51, 51, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;List&lt;/span&gt;&lt;/span&gt;&lt;car&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Cars.Add(&lt;span style="color: rgb(51, 51, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Car&lt;/span&gt;(&lt;span style="color: rgb(153, 0, 0);"&gt;"TATA"&lt;/span&gt;,&lt;span style="color: rgb(153, 0, 0);"&gt;"Red"&lt;/span&gt;,100000));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Cars.Add(&lt;span style="color: rgb(51, 51, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Car&lt;/span&gt;(&lt;span style="color: rgb(153, 0, 0);"&gt;"TATA"&lt;/span&gt;, &lt;span style="color: rgb(153, 0, 0);"&gt;"Yellow"&lt;/span&gt;, 100000));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Cars.Add(&lt;span style="color: rgb(51, 51, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Car&lt;/span&gt;(&lt;span style="color: rgb(153, 0, 0);"&gt;"TATA"&lt;/span&gt;, &lt;span style="color: rgb(153, 0, 0);"&gt;"White"&lt;/span&gt;, 100000));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Cars.Add(&lt;span style="color: rgb(51, 51, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Car&lt;/span&gt;(&lt;span style="color: rgb(153, 0, 0);"&gt;"Maruti&lt;/span&gt;", &lt;span style="color: rgb(153, 0, 0);"&gt;"Red"&lt;/span&gt;, 300000));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Cars.Add(&lt;span style="color: rgb(51, 51, 255);"&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Car&lt;/span&gt;(&lt;span style="color: rgb(153, 0, 0);"&gt;"Maruti"&lt;/span&gt;,&lt;span style="color: rgb(153, 0, 0);"&gt; "Yellow"&lt;/span&gt;, 300000));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//Logic: Show All cars with Red Color&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Console&lt;/span&gt;.WriteLine("");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//Iterative Method&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Console&lt;/span&gt;.WriteLine("List Filter Normal Way:");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;foreach&lt;/span&gt; (&lt;span style="color: rgb(51, 153, 153);"&gt;Car &lt;/span&gt;C in Cars)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;if (C.Color == &lt;span style="color: rgb(153, 0, 0);"&gt;"Red"&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Console&lt;/span&gt;.WriteLine(C.Make + " Price " + C.Price);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//LINQ Query Method&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(153, 0, 0);"&gt;""&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(153, 0, 0);"&gt;"List Filter LINQ Way:"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;IEnumerable&lt;/span&gt;&lt;car&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 153, 153);"&gt; &lt;/span&gt;MatchCars;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;MatchCars = &lt;span style="color: rgb(51, 51, 255);"&gt;from &lt;/span&gt;C&lt;span style="color: rgb(51, 51, 255);"&gt; in&lt;/span&gt; Cars&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;where &lt;/span&gt;C.Color ==&lt;span style="color: rgb(153, 0, 0);"&gt; "Red"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;select &lt;/span&gt;C;&lt;/span&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;//here C is the object with type of Car&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//After the filtering condition all the attributes of car is selected.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;foreach&lt;/span&gt; (&lt;span style="color: rgb(51, 153, 153);"&gt;Car &lt;/span&gt;MatCar &lt;span style="color: rgb(51, 51, 255);"&gt;in &lt;/span&gt;MatchCars)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;Console&lt;/span&gt;.WriteLine(MatCar.Make +&lt;span style="color: rgb(153, 0, 0);"&gt; " Price "&lt;/span&gt; + MatCar.Price);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/car&gt;&lt;/car&gt;&lt;/car&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong style="color: rgb(0, 153, 0);"&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;List Filter Normal way:&lt;br /&gt;TATA Price 100000&lt;br /&gt;Maruti Price 300000&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;List Filter LINQ way:&lt;br /&gt;TATA Price 100000&lt;br /&gt;Maruti Price 300000&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-2975664621918181355?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/2975664621918181355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=2975664621918181355' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2975664621918181355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2975664621918181355'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/object-filtering-using-linq.html' title='Object filtering using LINQ'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-7066195044201890401</id><published>2009-05-03T14:14:00.000+05:30</published><updated>2009-05-03T14:25:56.836+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PL/SQL'/><title type='text'>PRAGMA AUTONOMOUS_TRANSACTION:To Commit a part of Tranasaction in PL/SQL</title><content type='html'>&lt;div align="'JUSTIFY'"&gt;There would be business requirement to just commit or rollback part of the transaction regardless of the actual transactions success or failure.We can handle this using PRAGMA AUTONOMOUS_TRANSACTION, if we create a block as PRAGMA AUTONOMOUS_TRANSACTION then this will be independent of thecalling block so if we Commit or rollback a transaction in this PRAGMA AUTONOMOUS_TRANSACTION block will have no commit/rollback impact on the called block.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Example:&lt;br /&gt;create table pragma_table (ename varchar2(32), e_id number);&lt;br /&gt;insert into pragma_table values ('','1');&lt;br /&gt;insert into pragma_table values ('','2');&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE PROCEDURE Sample_AUTONOMOUS_TRANSACTION(emp_id number)&lt;br /&gt;AS  PRAGMA AUTONOMOUS_TRANSACTION;&lt;br /&gt;BEGIN&lt;br /&gt;    UPDATE pragma_table SET ename = 'TWO' Where e_id = 2;&lt;br /&gt;   dbms_output.put_line('Iyen going to Commit');&lt;br /&gt;   COMMIT;&lt;br /&gt;EXCEPTiON  WHEN OTHERS THEN&lt;br /&gt;    dbms_output.put_line('Iyen in Pragma Exception so rollback'  sqlerrm);&lt;br /&gt;ROLLBACK;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;  UPDATE pragma_table SET ename = 'ONE' Where e_id = 1;      &lt;t&gt;Sample_AUTONOMOUS_TRANSACTION(2);exception  when others then    &lt;t&gt;dbms_output.put_line('Iyen Example in exception'  sqlerrm);&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;  Execute the below select once with Commit and once with rollback; You can find the difference.&lt;br /&gt;select * from pragma_table;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;RoT:&lt;/strong&gt; As a Rule of Thumb , always make sure that your Autonomous transaction block is either getting rollback or commit.&lt;br /&gt;&lt;br /&gt;Do send your comments.&lt;br /&gt;&lt;br /&gt;--Iyen&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-7066195044201890401?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/7066195044201890401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=7066195044201890401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7066195044201890401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7066195044201890401'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/pragma-autonomoustransactionto-commit.html' title='PRAGMA AUTONOMOUS_TRANSACTION:To Commit a part of Tranasaction in PL/SQL'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-5652316988689985541</id><published>2009-05-03T14:06:00.000+05:30</published><updated>2009-05-08T21:22:49.749+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Overriding Vs Hiding/Shadowing</title><content type='html'>&lt;strong&gt;Overriding:&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;An override method provides a new implementation of a member inherited from a base class. The overridden base method must have the same signature as the override method.You cannot override a non-virtual or static method. The overridden base method must be virtual, abstract, or override.&lt;/li&gt;&lt;li&gt;Only a procedure (Function or Sub) or property&lt;/li&gt;&lt;li&gt;Overriding the accessibility is not possible(Base and child class having same access specifiers).&lt;/li&gt;&lt;li&gt;Overriding element inherited by further derived classes; overridden element still overridden.&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;Hiding(C#)/Shadowing(VB.NET):&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;When two programming elements share the same name, one of them can hide, or shadow, the other one. In such a situation, the shadowed element is not available for reference.&lt;/li&gt;&lt;li&gt;It applied to any declared element type(procedure (Function or Sub) or property and fields).&lt;/li&gt;&lt;li&gt;Any accessibility is possible.&lt;/li&gt;&lt;li&gt;Shadowing element inherited by further derived classes; shadowed element still hidden.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff0000;"&gt;class BaseClass&lt;br /&gt;{&lt;br /&gt;public int X = 10;&lt;br /&gt;public virtual string overridingMethod()&lt;br /&gt;{&lt;br /&gt;return "BaseClass overridingMethod \n";&lt;br /&gt;}&lt;br /&gt;public string hidingMethod()&lt;br /&gt;{&lt;br /&gt;return "BaseClass hidingMethod \n";&lt;br /&gt;}&lt;br /&gt;public void ParentDisplay()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Paerent " + X);&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff0000;"&gt;class DerivedClass : BaseClass&lt;br /&gt;{&lt;br /&gt;public new string X = "Hai";&lt;/span&gt; //Hiding applied even field also(new keyword used for hiding)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff0000;"&gt;public override string overridingMethod()&lt;br /&gt;{&lt;br /&gt;return "DerivedClass overridingMethod \n";&lt;br /&gt;}&lt;br /&gt;internal new string hidingMethod()&lt;/span&gt; //Change of accessibility possible in hiding&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;br /&gt;return "DerivedClass hidingMethod \n";&lt;br /&gt;}&lt;br /&gt;public void childDisplay()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Child " + X);&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff0000;"&gt;class MainClass&lt;br /&gt;{&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;BaseClass bc = new BaseClass();&lt;br /&gt;Console.WriteLine("Base class ref assigned to Base class object");&lt;br /&gt;bc.ParentDisplay();&lt;br /&gt;Console.Write(bc.overridingMethod());&lt;br /&gt;Console.Write(bc.hidingMethod());&lt;br /&gt;DerivedClass dc = new DerivedClass();&lt;br /&gt;Console.WriteLine("");&lt;br /&gt;Console.WriteLine("Derived class ref assigned to Derived class object");&lt;br /&gt;dc.ParentDisplay();&lt;br /&gt;dc.childDisplay();&lt;br /&gt;Console.Write(dc.overridingMethod());&lt;br /&gt;Console.Write(dc.hidingMethod());&lt;br /&gt;BaseClass bc2 = new DerivedClass();&lt;br /&gt;Console.WriteLine("");&lt;br /&gt;Console.WriteLine("Base class ref assigned to Derived class object");&lt;br /&gt;bc2.ParentDisplay();&lt;br /&gt;Console.Write(bc2.overridingMethod());&lt;/span&gt; //It will return overrided method(not relavent to it's reference)&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Console.Write(bc2.hidingMethod());&lt;/span&gt; //It will return method which is relavent to it's reference&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Output :&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;Base class ref assigned to Base class object&lt;br /&gt;Parent 10&lt;br /&gt;BaseClass overridingMethod&lt;br /&gt;BaseClass hidingMethod&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;Derived class ref assigned to Derived class object&lt;br /&gt;Parent 10&lt;br /&gt;Child Hai&lt;br /&gt;DerivedClass overridingMethod&lt;br /&gt;DerivedClass hidingMethod&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;Base class ref assigned to Derived class object&lt;br /&gt;Parent 10&lt;br /&gt;DerivedClass overridingMethod&lt;br /&gt;BaseClass hidingMethod&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-5652316988689985541?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/5652316988689985541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=5652316988689985541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5652316988689985541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5652316988689985541'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/overriding-vs-hidingshadowing.html' title='Overriding Vs Hiding/Shadowing'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-2194668696609069035</id><published>2009-05-03T13:37:00.001+05:30</published><updated>2009-07-10T23:11:08.355+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Reflection in .NET Framework</title><content type='html'>Reflection is the feature in .Net, which enables us to get some information about object in runtime. That information contains data of the class. System.Reflection namespace contains all the Reflection related classes. These classes are used to get information from any of the class under .NET framework.&lt;br /&gt;&lt;br /&gt;The &lt;span style="color:#ff0000;"&gt;Type class&lt;/span&gt; is the &lt;span style="color:#ff0000;"&gt;root&lt;/span&gt; of all reflection operations. Type is an abstract base class that acts as means to access metadata though the reflection classes. Using Type object, any information related to methods, implementation details and manipulating information can be obtained. The types include the &lt;span style="color:#ff0000;"&gt;constructors, methods, fields, properties, and events&lt;/span&gt; of a class, along with this the &lt;span style="color:#ff0000;"&gt;module&lt;/span&gt;&lt;span style="color:#000000;"&gt; and&lt;/span&gt; the &lt;span style="color:#ff0000;"&gt;assembly&lt;/span&gt; in which these information are present can be accessed and manipulated easily.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;public class TestDataType&lt;br /&gt;{&lt;br /&gt;public delegate void DelMaxCounterAttained(int Counter);&lt;br /&gt;public event DelMaxCounterAttained MaxCounterAttained;&lt;br /&gt;public TestDataType()&lt;br /&gt;{&lt;br /&gt;counter = 1;&lt;br /&gt;}&lt;br /&gt;public TestDataType(int c)&lt;br /&gt;{&lt;br /&gt;counter = c;&lt;br /&gt;}&lt;br /&gt;public int counter;&lt;br /&gt;public int Inc()&lt;br /&gt;{&lt;br /&gt;if (counter++ &gt;= 10)&lt;br /&gt;MaxCounterAttained(counter);&lt;br /&gt;return counter;&lt;br /&gt;}&lt;br /&gt;public int Dec()&lt;br /&gt;{&lt;br /&gt;return counter--;&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;&lt;span style="color:#ff0000;"&gt;&lt;p&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="color:#ff0000;"&gt;public class ReflectionSample&lt;br /&gt;{&lt;br /&gt;public static void Main()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:#009900;"&gt;//At first we should get type of object that was created.&lt;/span&gt;&lt;br /&gt;TestDataType testObject = new TestDataType(15);&lt;br /&gt;Type objectType = testObject.GetType(); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Using objectType we can able to extract constructor, method and events information&lt;/span&gt;&lt;br /&gt;ConstructorInfo[] info = objectType.GetConstructors();&lt;br /&gt;FieldInfo[] fields = objectType.GetFields();&lt;br /&gt;MethodInfo[] methods = objectType.GetMethods();&lt;br /&gt;EventInfo[] events = objectType.GetEvents();&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;// get all the constructors&lt;br /&gt;&lt;/span&gt;Console.WriteLine("Constructors:");&lt;br /&gt;foreach (ConstructorInfo cf in info)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(cf);&lt;br /&gt;}&lt;br /&gt;Console.WriteLine();&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//get all the fields&lt;/span&gt;&lt;br /&gt;Console.WriteLine("Fileds:");&lt;br /&gt;foreach (FieldInfo ff in fields)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(ff);&lt;br /&gt;}&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#009900;"&gt;// get all the methods&lt;/span&gt;&lt;br /&gt;Console.WriteLine("Methods and handles:");&lt;br /&gt;foreach (MethodInfo mf in methods)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(mf);&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#009900;"&gt;//get all the events&lt;/span&gt;&lt;br /&gt;Console.WriteLine("Events:");&lt;br /&gt;foreach (EventInfo ef in events)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(ef);&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;Constructors:&lt;br /&gt;Void .ctor()&lt;br /&gt;Void .ctor(Int32)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;Fields:&lt;br /&gt;Int32 counter&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;Methods and hanles:&lt;br /&gt;void add_MaxCounterAttained(DelMaxCounterAttained)&lt;br /&gt;void remove_MaxCounterAttained(DelMaxCounterAttained)&lt;br /&gt;Int32 Inc()&lt;br /&gt;Int32 Dec()&lt;br /&gt;System.String ToString()&lt;br /&gt;Boolean Equals(System.Object)&lt;br /&gt;Int32 GetHashCode()&lt;br /&gt;System.Type GetType()&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;Events:&lt;br /&gt;DelMaxCounterAttained MaxCounterAttained&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-2194668696609069035?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/2194668696609069035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=2194668696609069035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2194668696609069035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2194668696609069035'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/reflection-in-net.html' title='Reflection in .NET Framework'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-5262012157185972132</id><published>2009-05-03T10:36:00.001+05:30</published><updated>2009-07-10T23:13:57.408+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='OOPS'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Abstract Class Vs Interface</title><content type='html'>&lt;strong&gt;Abstract Class :&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;We can not make instance of Abstract Class as well as Interface. It cannot be a sealed class. It can contain abstract methods, abstract property as well as other members (just like normal class).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Interface:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Interface can only contain abstract methods, properties but we don’t need to put abstract and public keyword. All the methods and properties defined in Interface are by default public and abstract. Interface are useful to achieve Multiple inheritence.&lt;br /&gt;&lt;br /&gt;abstact class is a &lt;span style="color:#ff0000;"&gt;abstract view&lt;/span&gt; of any realword entity and interface is &lt;span style="color:#ff0000;"&gt;more abstract one&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;br /&gt;//Abstract class&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public abstract class Calculate&lt;br /&gt;{&lt;br /&gt;public abstract int Result&lt;br /&gt;{&lt;br /&gt;get;&lt;br /&gt;set;&lt;br /&gt;}&lt;br /&gt;public abstract void Summation(int First, int Second);&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;//Interface&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public interface ICalculate&lt;br /&gt;{&lt;br /&gt;int Result&lt;br /&gt;{&lt;br /&gt;get;&lt;br /&gt;set;&lt;br /&gt;}&lt;br /&gt;void Summation(int First, int Second);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;br /&gt;&lt;/span&gt;//Abstract class inherited class&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public class ClsAbstraction : Calculate&lt;br /&gt;{&lt;br /&gt;private int m_Result;&lt;br /&gt;public override void Summation(int First, int Second)&lt;br /&gt;{&lt;br /&gt;m_Result = First + Second;&lt;br /&gt;}&lt;br /&gt;public override int Result&lt;br /&gt;{&lt;br /&gt;get { return m_Result; }&lt;br /&gt;set { m_Result = value; }&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;//Interface implemented class&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public class ClsInterface : ICalculate&lt;br /&gt;{&lt;br /&gt;private int m_Result;&lt;br /&gt;public void Summation(int First, int Second)&lt;br /&gt;{&lt;br /&gt;m_Result = First + Second;&lt;br /&gt;}&lt;br /&gt;public int Result&lt;br /&gt;{&lt;br /&gt;get { return m_Result; }&lt;br /&gt;set { m_Result = value; }&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;//Main class&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public class ClsMain&lt;br /&gt;{&lt;br /&gt;public static void Main()&lt;br /&gt;{&lt;br /&gt;//Using abstarct class&lt;br /&gt;ClsAbstraction objClsAbstarction = new ClsAbstraction();&lt;br /&gt;objClsAbstarction.Summation(4, 5);&lt;br /&gt;Console.WriteLine("Abs class result " + objClsAbstarction.Result);&lt;br /&gt;//Using Interface&lt;br /&gt;ClsInterface ObjClsInterface = new ClsInterface();&lt;br /&gt;ObjClsInterface.Summation(5, 5);&lt;br /&gt;Console.WriteLine("Interface result " + ObjClsInterface.Result);&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;Abstract class having upper-hand in compare to interface. Using interface having only advantage of multiple inheritance.&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-5262012157185972132?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/5262012157185972132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=5262012157185972132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5262012157185972132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5262012157185972132'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/abstract-class-vs-interface.html' title='Abstract Class Vs Interface'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-7397205659943754706</id><published>2009-05-02T23:03:00.000+05:30</published><updated>2009-05-03T10:18:26.087+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='DataType'/><title type='text'>Difference between String and string data types</title><content type='html'>There is no difference between string and String data type. string is C# based keyword and it is alaises for CLR Type(String).&lt;br /&gt;&lt;br /&gt;C# defines a number of aliases for CLR types. It have the keywords because they are easier to remember and programmers coming from other languages like c/c++ would also be familiar with these types. They may be used interchangably, and even mixed together,&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;e.g : string x = new System.String(' ', 5);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;These are the aliases defined:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;string-&gt;System.Strings&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;byte-&gt;System.SByte&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;byte-&gt;System.Byte&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;short-&gt;System.Int16&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;ushort-&gt;System.UInt16&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;int-&gt;System.Int32&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;uint-&gt;System.UInt32&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;long-&gt;System.Int64&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;ulong-&gt;System.UInt64&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;char-&gt;System.Char&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;float-&gt;System.Single&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;double-&gt;System.Double&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;bool-&gt;System.Boolean&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;decimal-&gt;System.Decimal&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-7397205659943754706?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/7397205659943754706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=7397205659943754706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7397205659943754706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7397205659943754706'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/difference-between-string-and-string.html' title='Difference between String and string data types'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-3992908457263604933</id><published>2009-05-02T22:33:00.001+05:30</published><updated>2009-07-10T23:09:37.692+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='DataType'/><title type='text'>Boxing and Unboxing in .NET</title><content type='html'>&lt;strong&gt;Boxing:&lt;/strong&gt;&lt;br /&gt;Converting a value type to reference type is called Boxing.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Unboxing:&lt;/strong&gt;&lt;br /&gt;Unboxing is an explicit operation. You have to tell which value type you want to extract from the object.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Int32 vt= 10;&lt;/span&gt; &lt;span style="color:#009900;"&gt;//value type variable&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;object rt= vt;&lt;/span&gt; &lt;span style="color:#009900;"&gt;/*memory is allocated on the heap of size equal to size of vt,the value type bits are copied to the newly allocated memory and the address of the object is returned and stored in rt.This is basically called Boxing.*/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Int32 vt2=(Int32)rt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;//Unboxing&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Purpose of Boxing and UnBoxing :&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;.NET provides a unified type system. All types including value types derive from the type &lt;span style="color:#ff0000;"&gt;object&lt;/span&gt;. It is possible to call object methods &lt;span style="color:#ff0000;"&gt;on any value&lt;/span&gt;, even values of &lt;span style="color:#ff0000;"&gt;primitive types&lt;/span&gt; such as int.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;private void display()&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Console.WriteLine(3.ToString());&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;calls the object-defined ToString method on an integer value.In programs that need int values to behave like objects, this capability is available on demand. This ability to treat value types as objects &lt;span style="color:#ff0000;"&gt;bridges the gap between&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;value types and reference types&lt;/span&gt; that exists in most languages. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-3992908457263604933?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/3992908457263604933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=3992908457263604933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3992908457263604933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/3992908457263604933'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/boxing-and-unboxing.html' title='Boxing and Unboxing in .NET'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-5300127187614773163</id><published>2009-05-02T19:58:00.001+05:30</published><updated>2009-07-10T23:15:34.538+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Memory Management'/><title type='text'>Destructor,Finalizer and Dispose Method in .NET Framework</title><content type='html'>&lt;strong&gt;Destructor and Finalizer:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Destructor are called by the CLR when the Garbage Collector destroys an object. In VB.NET it is called the&lt;span style="color:#ff0000;"&gt; Finalize()&lt;/span&gt; method. In C# it is declared by putting a tilda '~' in front of the class name (~MyClass() {}). Destructors aren't the best place to put clean up code. This is because it is only &lt;span style="color:#ff0000;"&gt;called by the GC&lt;/span&gt; and you can't determine when it will be called (you can force it to be called, but that's not recommended).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dispose:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;The Dispose() method is simply a method you call manually to clean up yourobject. For this &lt;span style="color:#ff0000;"&gt;explicit clean up&lt;/span&gt;, .NET provides the &lt;span style="color:#ff0000;"&gt;dispose design pattern&lt;/span&gt;. Objects which need explicit clean up of unmanaged resources(connection object,File objects, etc..) implement the IDisposable interface. The IDisposable interface consists of the Dispose method, which unlike the Finalize method is under the control of the developer.&lt;br /&gt;&lt;br /&gt;The recommended practice is to implement both Finalize as well as Dispose methods on an object which needs to clean up unmanaged resources. The Finalize method would serve as a backup mechanism in the event that the Dispose is never called. The garbage collector would perform the object finalization and prevent a &lt;span style="color:#ff0000;"&gt;permanent leak of the unmanaged resource&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-5300127187614773163?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/5300127187614773163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=5300127187614773163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5300127187614773163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/5300127187614773163'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/use-of-destructorfinalizer-and-dispose.html' title='Destructor,Finalizer and Dispose Method in .NET Framework'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-4933467874046748079</id><published>2009-05-02T18:29:00.001+05:30</published><updated>2009-07-10T23:17:29.658+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Memory Management'/><title type='text'>Destructor and Forced Garbage Collection in .NET Framework</title><content type='html'>&lt;span style="color:#000000;"&gt;&lt;strong&gt;Destructor :&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;In simple terms a destructor is a member that implements the actions required to destruct an instance of a class. The destructors enable the runtime system. Destructor method is called only by &lt;span style="color:#ff0000;"&gt;.Net frameworks Garbage Collector (GC).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Forced Garbage Collection :&lt;/span&gt; &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;Foced Garbage collection is executed by means of calling System.GC.Collect() method. The garbage collector checks to see if there are any objects in the heap that are no longer being used by the application(checking the &lt;span style="color:#ff0000;"&gt;references exist for an object&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;class Person&lt;br /&gt;{&lt;br /&gt;public Person()&lt;span style="color:#009900;"&gt; //Constructor&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;Console.WriteLine("Person {0} constructor", GetHashCode());&lt;br /&gt;}&lt;br /&gt;~Person()&lt;span style="color:#009900;"&gt; //Destructor&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Person {0} finalizer", GetHashCode());&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;class GCDemo&lt;br /&gt;{&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;Person p = new Person(); &lt;span style="color:#009900;"&gt;// The constructor is invoked here.&lt;/span&gt;&lt;br /&gt;p = null;&lt;br /&gt;Console.WriteLine("The object p will not be used anymore ");&lt;br /&gt;Person pc = new Person();&lt;span style="color:#009900;"&gt; // The constructor is invoked here.&lt;/span&gt;&lt;br /&gt;pc = null;&lt;br /&gt;Console.WriteLine("The object pc will not be used anymore ");&lt;br /&gt;GC.Collect(); &lt;span style="color:#009900;"&gt;// Force to collect.&lt;br /&gt;&lt;/span&gt;Console.WriteLine("Now the carbage collection is called forcefully...");&lt;br /&gt;GC.WaitForPendingFinalizers(); &lt;span style="color:#009900;"&gt;// Wait until it finish&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Output: &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="color:#ff0000;"&gt;Person 33156464 constructor&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;The object p will not be used anymore &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Person 15645912 constructor&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;The object pc will not be used anymore &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Now the carbage collection is called forcefully...&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Person 33156464 finalizer&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Person 15645912 finalizer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Conclusion:&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color:#009900;"&gt;Destructor methods are called after the garbage collection method executed.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color:#009900;"&gt;Garbage collector destroys both person objects because reference "p" and "pc" is null.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color:#009900;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-4933467874046748079?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/4933467874046748079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=4933467874046748079' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/4933467874046748079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/4933467874046748079'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/destructor-and-forced-garbage.html' title='Destructor and Forced Garbage Collection in .NET Framework'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-7506928886455172240</id><published>2009-05-02T11:22:00.000+05:30</published><updated>2009-05-02T12:16:03.617+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Database Manipulation'/><category scheme='http://www.blogger.com/atom/ns#' term='ADO.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Step by step process of getting connection string from web.config</title><content type='html'>Getting Connection string from web.config&lt;br /&gt;In web.config file you find tag like this&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#663300;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;/&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;br /&gt;We have to write a connection in connectionstring tag so that we can use in our application.&lt;br /&gt;&lt;br /&gt;Steps are&lt;br /&gt;&lt;br /&gt;1.replace&lt;span style="color:#3333ff;"&gt; &amp;lt;&lt;/span&gt;&lt;span style="color:#663300;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;/&amp;gt;&lt;/span&gt; by&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#663300;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#663300;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2.add connection string to this tag&lt;br /&gt;Sql Authentication Connection,you have the user name and passwords of ur database&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#663300;"&gt;add&lt;/span&gt; &lt;span style="color:#cc0000;"&gt;name&lt;/span&gt;="&lt;span style="color:#3333ff;"&gt;ConnectionStringName&lt;/span&gt;" &lt;span style="color:#cc0000;"&gt;connectionString&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;="Data Source=.\Sqlexpress;Initial Catalog=databasename;User ID=databaseuserid;Password=databasepassword"&lt;/span&gt; &lt;span style="color:#cc0000;"&gt;providerName&lt;/span&gt;="&lt;span style="color:#3333ff;"&gt;System.Data.SqlClient&lt;/span&gt;"&lt;span style="color:#3333ff;"&gt;/&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;br /&gt;&lt;/span&gt;Windows Authentication Connection default settings of Sqlserver2005&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#663300;"&gt;add&lt;/span&gt; &lt;span style="color:#cc0000;"&gt;name&lt;/span&gt;="&lt;span style="color:#3333ff;"&gt;ConnectionStringName&lt;/span&gt;" &lt;span style="color:#cc0000;"&gt;connectionString&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;="Data Source=.\Sqlexpress;Initial Catalog=databasename;integrated security=SSPI"&lt;/span&gt; &lt;span style="color:#cc0000;"&gt;providerName&lt;/span&gt;="&lt;span style="color:#3333ff;"&gt;System.Data.SqlClient&lt;/span&gt;"&lt;span style="color:#3333ff;"&gt;/&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;br /&gt;&lt;/span&gt;Just u have to replace User ID=databaseuserid;Password=databasepassword to&lt;br /&gt;integrated security=SSPI that’s all for Sql Authentication to Windows Authentication&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;It look like this&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#663300;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#663300;"&gt;add&lt;/span&gt; &lt;span style="color:#cc0000;"&gt;name&lt;/span&gt;="&lt;span style="color:#3333ff;"&gt;ConnectionStringName&lt;/span&gt;" &lt;span style="color:#cc0000;"&gt;connectionString&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;="Data Source=.\Sqlexpress;Initial Catalog=databasename;User ID=databaseuserid;Password=databasepassword"&lt;/span&gt; &lt;span style="color:#cc0000;"&gt;providerName&lt;/span&gt;="&lt;span style="color:#3333ff;"&gt;System.Data.SqlClient&lt;/span&gt;"&lt;span style="color:#3333ff;"&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#663300;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#cc0000;"&gt;or&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#663300;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#663300;"&gt;add&lt;/span&gt; &lt;span style="color:#cc0000;"&gt;name&lt;/span&gt;="&lt;span style="color:#3333ff;"&gt;ConnectionStringName&lt;/span&gt;" &lt;span style="color:#cc0000;"&gt;connectionString&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;="Data Source=.\Sqlexpress;Initial Catalog=databasename;integrated security=SSPI"&lt;/span&gt; &lt;span style="color:#cc0000;"&gt;providerName&lt;/span&gt;="System.Data.SqlClient"&lt;span style="color:#3333ff;"&gt;/&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#663300;"&gt;connectionStrings&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;3. Getting Connection from web.config using c#&lt;br /&gt;&lt;br /&gt;Add fallowing Namespace to your application&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Web.Configuration;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;using&lt;/span&gt; System.Data.SqlClient;&lt;br /&gt;&lt;br /&gt;Code for getting connection&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;SqlConnection&lt;/span&gt; sqlConn = null;&lt;br /&gt;&lt;br /&gt;String str=&lt;br /&gt;&lt;span style="color:#009900;"&gt;WebConfigurationManager&lt;/span&gt;.ConnectionStrings["&lt;span style="color:#3333ff;"&gt;ConnectionStringName&lt;/span&gt;"].ToString();&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#006600;"&gt;// Note:Ensure ConnectionStringName is same we mentioned in web.config file that all&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;sqlConn = &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; SqlConnection(str);&lt;br /&gt;sqlConn.Open();&lt;br /&gt;&lt;br /&gt;// do operation&lt;br /&gt;&lt;br /&gt;sqlConn.Close();&lt;br /&gt;&lt;br /&gt;Enjoy this coding…&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-7506928886455172240?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/7506928886455172240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=7506928886455172240' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7506928886455172240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7506928886455172240'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/05/step-by-step-process-of-connection.html' title='Step by step process of getting connection string from web.config'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-6030151593668967997</id><published>2009-04-29T18:21:00.000+05:30</published><updated>2009-04-29T21:51:50.975+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><title type='text'>How to change from Windows Authentication to SQL Server Authentication for SQLExpress 2005</title><content type='html'>While installing SQL Express, we have to specify Sql Authentication mode and specify password for sa otherwise Windows Authentication mode being enabled (it is a default mode). To change mode we have to perform the following steps to change to SQL Server Authentication, using the sa (system administrator) account&lt;br /&gt;&lt;br /&gt;1) Enable SQL Server Authentication by executing: "ALTER LOGIN sa ENABLE", or by using the Microsoft SQL Server Management Studio Express application.&lt;br /&gt;&lt;br /&gt;2) Change/set the password for the sa account by executing: "ALTER LOGIN sa WITH PASSWORD = 'yourpassword'"&lt;br /&gt;&lt;br /&gt;3) Stop the SQL Server service&lt;br /&gt;&lt;br /&gt;4) Open regedit, go to the "HKLMSoftwareMicrosoftMSSqlserverMSSqlServer" entry and set the LoginMode value to 2.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;goto start-&gt;run-&gt; type regedit&lt;br /&gt;goto search window find LoginMode&lt;br /&gt;it will show in sqlserver entry set LoginMode 2 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServerLoginMode 2 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5) Restart the SQL Server service&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-6030151593668967997?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/6030151593668967997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=6030151593668967997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6030151593668967997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6030151593668967997'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/how-to-change-from-windows.html' title='How to change from Windows Authentication to SQL Server Authentication for SQLExpress 2005'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-555169726205077702</id><published>2009-04-28T19:08:00.000+05:30</published><updated>2009-04-28T19:39:58.632+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SMPT Client'/><category scheme='http://www.blogger.com/atom/ns#' term='Email'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Email through SMPT Client (ASP.NET/C#)</title><content type='html'>Yes,it is easy to send email in .Net application through SMTP Client.First you have add&lt;br /&gt;using System.Net.Mail; namespace should be added in your application.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;using System.Net.Mail; &lt;/span&gt;&lt;span style="color:#006600;"&gt;//namespace&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;SmtpClient smtpClient = new SmtpClient("smtp.gmail.com", 587); &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;br /&gt;System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential("yourmailid@gmail.com", "yourgmailpassword");&lt;br /&gt;&lt;br /&gt;MailMessage message = new MailMessage();&lt;br /&gt;try&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;MailAddress fromAddress = new MailAddress("&lt;a href="mailto:fromemailid@gmail.com"&gt;fromemailid@gmail.com&lt;/a&gt;"iyen");&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#006600;"&gt;// Enable SSL&lt;br /&gt;&lt;/span&gt;smtpClient.EnableSsl = true; &lt;/span&gt;&lt;/p&gt;&lt;span style="color:#ff0000;"&gt;&lt;p&gt;&lt;br /&gt;smtpClient.UseDefaultCredentials = false; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;smtpClient.Credentials = mailAuthentication; &lt;/p&gt;&lt;p&gt;&lt;span style="color:#006600;"&gt;////From address will be given as a MailAddress Object&lt;/span&gt;&lt;br /&gt;message.From = fromAddress;&lt;br /&gt;&lt;span style="color:#006600;"&gt;// To address collection of MailAddress&lt;br /&gt;&lt;/span&gt;message.To.Add(&lt;a href="mailto:Togmail@gmail.com"&gt;Togmail@gmail.com&lt;/a&gt;); &lt;/p&gt;&lt;p&gt;&lt;br /&gt;message.Subject = "Test Mail from C# Application";&lt;br /&gt;&lt;br /&gt;message.IsBodyHtml = false;&lt;br /&gt;&lt;span style="color:#006600;"&gt;//// Message body content&lt;/span&gt;&lt;br /&gt;message.Body = "Nice C# function"&lt;/span&gt;&lt;/p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#006600;"&gt;//// Send SMTP mail&lt;/span&gt;&lt;br /&gt;smtpClient.Send(message);&lt;br /&gt;MessageBox.Show("Email successfully sent.");&lt;br /&gt;}&lt;br /&gt;catch (Exception ex)&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;MessageBox.Show("Send Email Failed");&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Before run this program check your are given &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Vaild y&lt;/span&gt;&lt;a href="mailto:yourmailid@gmail.com"&gt;&lt;span style="color:#000000;"&gt;ourmailid@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; , yourgmailpassword and vaild &lt;/span&gt;&lt;a href="mailto:Togmail@gmail.com"&gt;&lt;span style="color:#000000;"&gt;Togmail@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;..&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-555169726205077702?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/555169726205077702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=555169726205077702' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/555169726205077702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/555169726205077702'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/email-through-smpt-client-in-c.html' title='Email through SMPT Client (ASP.NET/C#)'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-2499747588703396684</id><published>2009-04-27T20:11:00.001+05:30</published><updated>2009-07-10T23:18:27.559+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADO.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>Connection Pooling in .NET</title><content type='html'>Acquiring a connection takes a short, but definite amount of time. In web application in which requests are being handled efficiently,connections will be opened and &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;closed endlessly&lt;/span&gt; as new requests are processed. In this environment, a small overhead required to establish a connection can become significant and limit the scalability of the system.&lt;br /&gt;&lt;br /&gt;One solution is connection pooling. Connection pooling is the practise of keeping a permanent set of open database connections to be shared by the sessions that uses the same data sources. This avoids the need to create and destroy connection all the time.&lt;br /&gt;&lt;br /&gt;When client requests the connection by calling &lt;span style="color:#ff0000;"&gt;Open()&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt; it's served directly fro the &lt;span style="color:#ff0000;"&gt;available pool&lt;/span&gt;, &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;rather than&lt;/span&gt; re-created. When the client release the connections by calling &lt;span style="color:#ff0000;"&gt;Close()&lt;/span&gt; or &lt;span style="color:#ff0000;"&gt;Dispose()&lt;/span&gt;, it's &lt;span style="color:#ff0000;"&gt;not discarded&lt;/span&gt; but &lt;span style="color:#ff0000;"&gt;returned to the pool&lt;/span&gt; to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;serve&lt;/span&gt; next request.&lt;br /&gt;&lt;br /&gt;You can able to configure connection pool setting in connection strings. Various connection pool settings are as follows&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;a. Max Pool Size :&lt;/span&gt; The maximum number of connections allowed in the pool. If the maximum pool size size has been reached, any further attempts wait &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;until&lt;/span&gt; a connection become available.(An error is raised if the connection timeout value elapses before a connection available.)&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;b. Min Pool Size :&lt;/span&gt; The minimum number of connection always retained in the pool(&lt;span style="color:#ff0000;"&gt;default as 0&lt;/span&gt;). This number of connections will be created when the first connection is opened, leading minor delay for the first request.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;c. Pooling :&lt;/span&gt; When true (the default), the connection is drawn from the appropriate pool or, if necessary, is created and added to the appropriate pool.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;d. Connection &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;Life Time&lt;/span&gt; :&lt;/span&gt; Connections is returned to the pool and its creation time is older than the specified lifetime.&lt;br /&gt;&lt;br /&gt;Example of connection string that set a minimum pool size:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;string &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Connectionstring&lt;/span&gt; = "Data Source = &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;localHost&lt;/span&gt;; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;Initial Catalog&lt;/span&gt; = master; Integrated Security = &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;SSPI&lt;/span&gt;; Min Pool Size = 10;Max Pool Size=60";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;SqlConnection&lt;/span&gt; con = new &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;SQlConnection&lt;/span&gt;(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Connectionstring&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Get the connection from the pool( if it exists)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//or create the pool with 10 connections(if it doesn't)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;con.Open();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;//Return connection to the pool.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;con.Close();&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-2499747588703396684?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/2499747588703396684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=2499747588703396684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2499747588703396684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2499747588703396684'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/connection-pooling.html' title='Connection Pooling in .NET'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-2785667269291951931</id><published>2009-04-26T16:58:00.000+05:30</published><updated>2009-04-26T17:19:06.843+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='VB.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Memory Management'/><title type='text'>Memory Usage Reduces On Application Minimize</title><content type='html'>Everseen memory usage of a program &lt;span style="color:#ff0000;"&gt;go down&lt;/span&gt; as soon as it’s &lt;span style="color:#ff0000;"&gt;minimized&lt;/span&gt;. Well how to achieve this programmatically(VB.NET and C#).&lt;br /&gt;&lt;br /&gt;Using the anyone of the following API function we can reduce memory usage.&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;SetProcessWorkingSetSize( GetCurrentProcess(), -1, -1 );&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;or&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;EmptyWorkingSet( GetCurrentProcess() );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sample Code:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;C#:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public class MemoryManagement&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;[DllImport("kernel32.dll")] &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public static extern bool SetProcessWorkingSetSize( IntPtr proc, int min, int max );&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public void ReleaseMemory() &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;GC.Collect() ;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;GC.WaitForPendingFinalizers() ;&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;if(Environment.OSVersion.Platform == PlatformID.Win32NT)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;{ &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1) ;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="color:#666666;"&gt;VB.NET :&lt;/span&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;public class MemoryManagement&lt;/span&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Private Declare Auto Function SetProcessWorkingSetSize Lib "kernel32.dll" (ByVal procHandle As IntPtr, ByVal min As Int32, ByVal max As Int32) As Boolean &lt;/span&gt;&lt;/div&gt;&lt;span style="color:#ff0000;"&gt;&lt;div&gt;&lt;br /&gt;Friend Sub ReleaseMemory()&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;GC.Collect() &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;GC.WaitForPendingFinalizers() &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;If Environment.OSVersion.Platform = PlatformID.Win32NT Then &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;End If &lt;/span&gt;&lt;/div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Catch &lt;/span&gt;&lt;/div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;End Try&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;End Sub &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;end class&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-2785667269291951931?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/2785667269291951931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=2785667269291951931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2785667269291951931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2785667269291951931'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/memory-usage-reduces-on-application.html' title='Memory Usage Reduces On Application Minimize'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-1508520866204789332</id><published>2009-04-22T23:22:00.001+05:30</published><updated>2009-07-10T23:22:07.615+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><title type='text'>Delete Vs Truncate(SQL Server)</title><content type='html'>&lt;p&gt;• Delete table is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow.&lt;/p&gt;&lt;p&gt;• Truncate table also deletes all the rows in a table, but it won’t log the deletion of each row, instead it logs the &lt;span style="color:#ff0000;"&gt;de-allocation of the data pages&lt;/span&gt; of the table, which makes it faster. Of course, truncate table cannot be rolled back.&lt;/p&gt;&lt;p&gt;• Truncate table is functionally identical to delete statement with no “where clause” both remove all rows in the table. But &lt;span style="color:#ff0000;"&gt;truncate table is faster&lt;/span&gt; and uses fewer system and transaction log resources than delete.&lt;/p&gt;&lt;p&gt;• Truncate table removes all rows from a table, but the table structure and its columns, constraints, indexes etc., remains as it is.&lt;/p&gt;&lt;p&gt;• In truncate table the counter used by an identity column for &lt;span style="color:#ff0000;"&gt;new rows is reset to the seed&lt;/span&gt; for the column.&lt;/p&gt;&lt;p&gt;• If you want to retain the identity counter, use delete statement instead.&lt;/p&gt;&lt;p&gt;• You cannot use truncate table on a table referenced by a foreign key constraint; instead, use delete statement without a where clause. &lt;/p&gt;&lt;p&gt;• Truncate table cannot &lt;span style="color:#ff0000;"&gt;activate a trigger&lt;/span&gt;(Any trigger created aganist Delete operation).&lt;/p&gt;&lt;p&gt;• Truncate table may not be used on tables participating in an indexed view.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-1508520866204789332?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/1508520866204789332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=1508520866204789332' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1508520866204789332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/1508520866204789332'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/delete-vs-truncate.html' title='Delete Vs Truncate(SQL Server)'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-2153894406109728584</id><published>2009-04-22T21:59:00.000+05:30</published><updated>2009-04-22T23:11:40.029+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><title type='text'>Update Statement Between Two Tables</title><content type='html'>"T1" is the table having the fields of id and name. There is another table "T2" having id and PetName with some additional information. Now to update "T1".name with "T2".PetName.&lt;br /&gt;Update query is as follows(condition between two tables),&lt;br /&gt;    &lt;span style="color:#ff0000;"&gt;update T1 set t1.name = T2.PetName &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;    from T2&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;    where T1.id = T2.id&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-2153894406109728584?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/2153894406109728584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=2153894406109728584' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2153894406109728584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2153894406109728584'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/update-statement-between-two-tables.html' title='Update Statement Between Two Tables'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-399381000156030993</id><published>2009-04-22T19:51:00.001+05:30</published><updated>2009-07-19T23:30:58.086+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Multilingual'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><title type='text'>SQL Server - Insert multilingual data in table</title><content type='html'>You need the N'' syntax only if the string contains characters which are not inside the default code page.&lt;br /&gt;&lt;br /&gt;"Best practice" is to have N'' whenever you insert into an nvarchar or ntext column.&lt;br /&gt;"Unicode string constants that appear in code executed on the server, such as in stored procedures and triggers, must be preceded by the capital letter N. This is true even if the column being referenced is already defined as Unicode. Without the N prefix, the string is converted to the default code page of the database.&lt;br /&gt;&lt;br /&gt;This may not recognize certain characters.The requirement to use the N prefix applies toboth string constants that originate on the server and those sent from the client."&lt;br /&gt;&lt;br /&gt;Like:&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;create table&lt;/span&gt; mul&lt;span style="color:#000000;"&gt; (lang&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;nvarchar&lt;/span&gt;(200))&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; mul&lt;span style="color:#000000;"&gt; (lang )&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt; &lt;span style="color:#000000;"&gt;(N&lt;/span&gt;'multilingual unicode strings'&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; mul &lt;span style="color:#000000;"&gt;(lang )&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt; &lt;span style="color:#000000;"&gt;(N&lt;/span&gt;' தமிழ்'&lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;insert into&lt;/span&gt; mul &lt;span style="color:#000000;"&gt;(lang )&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;values&lt;/span&gt; &lt;span style="color:#000000;"&gt;(N&lt;/span&gt;' 請提供服務的日期進行'&lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;use nVarChar as the column data type.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-399381000156030993?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/399381000156030993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=399381000156030993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/399381000156030993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/399381000156030993'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/sql-server-insert-multilingual-data-in.html' title='SQL Server - Insert multilingual data in table'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-2896719179142015872</id><published>2009-04-21T23:21:00.002+05:30</published><updated>2009-07-19T23:14:39.361+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><category scheme='http://www.blogger.com/atom/ns#' term='Database Recovery'/><category scheme='http://www.blogger.com/atom/ns#' term='Fix/Solution'/><title type='text'>How to fix SQL Server Error 3154: The backup set holds a backup of a database other than the existing database.</title><content type='html'>&lt;span style="color:#ff0000;"&gt;Fix/Solution: &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;br /&gt;&lt;/span&gt;Use WITH REPLACE while using the RESTORE command.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="color:#3333ff;"&gt;RESTORE DATABASE&lt;/span&gt; &lt;span style="color:#000000;"&gt;abc&lt;/span&gt; &lt;span style="color:#3333ff;"&gt;FROM DISK&lt;/span&gt;&lt;span style="color:#000000;"&gt; =&lt;/span&gt; 'C:\backup.bak' &lt;span style="color:#3333ff;"&gt;WITH&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#cc33cc;"&gt;REPLACE&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;In this example abc is one database,backup.bak is backup of abc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-2896719179142015872?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/2896719179142015872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=2896719179142015872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2896719179142015872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/2896719179142015872'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/how-to-fix-sql-error-3154-backup-set.html' title='How to fix SQL Server Error 3154: The backup set holds a backup of a database other than the existing database.'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-4418189603197471572</id><published>2009-04-15T22:15:00.000+05:30</published><updated>2009-04-21T23:19:33.574+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL SERVER'/><category scheme='http://www.blogger.com/atom/ns#' term='Database Recovery'/><title type='text'>How to Recover Suspected Database in SQL Server 2000</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;If a database is marked suspect it cannot be accessed and hence nothing can be performed in the database. A database can be marked suspect for one of the following reasons,&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;a.If one or more database files are not available.&lt;br /&gt;b.If the entire database is not available.&lt;br /&gt;c.If one or more database files are corrupted.&lt;br /&gt;d.If a database resource is being held by the operating system.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;In order to recover the suspected database, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;sysdatabases&lt;/span&gt; status is modified in master database.Before you do any changes with system table run the following command to enable &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;adhoc&lt;/span&gt; changes to the system tables.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;use master&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;go&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;sp&lt;/span&gt;_configure allow, 1 &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;go &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;reconfigure with override &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;go&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;sp&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;resetstatus&lt;/span&gt; ‘DatabaseName&lt;databasename&gt;’ &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="color:#ff0000;"&gt;go&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;After the procedure is run, immediately disable updates to the system tables: &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;sp&lt;/span&gt;_configure 'allow updates', 0&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;GO&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;RECONFIGURE WITH OVERRIDE &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="color:#ff0000;"&gt;GO&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;Then Stop and Restart ALL SQL Server Services.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;If the database still goes back into suspect mode, and you can't fix the original problem, and you have no recent backup, then you can get information out of the database by putting it into Emergency Mode. If you do this, extract the data/objects out with DTS and rebuild the database.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;The following command to put the database into emergency mode&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;USE master&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;GO&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;sp_configure 'allow updates', 1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;GO&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;RECONFIGURE WITH OVERRIDE&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;GO&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span style="color:#ff0000;"&gt;UPDATE master..sysdatabases SET status = 32768 &lt;/span&gt;&lt;span style="color:#ff0000;"&gt;WHERE name = 'DatabaseName&lt;databasename&gt;'&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;GO&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;sp&lt;/span&gt;_configure allow, 0&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;color:#ff0000;"&gt;go&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;Stop and Restart ALL SQL Server Services.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;We are now ready to pull whatever data we can out of the tables in the corrupt database. Remember, some tables may be corrupt, thus you may have to play with various T-SQL statements to get the data out. First try DTS using EnterprisesManager.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;These are the steps necessary to export data out of the corrupt database into the new: &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;a. Create a new production DB, or a temp DB, to have a place to export whatever data we can out of the corrupt db. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;b. Start a DTS operation by going into EM and drilling down to “Data Transformation Services” … “Local Packages”. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;c. Open a NEW DTS package by right-mouse clicking … &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;d. When DTS opens, choose “Copy SQL Server Objects Task” from the Connection Icons. Enter in a description like “Export Corrupt Data”. Enter in the SA/pass combination as well as the CORRUPT database from the drop-down. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;e. Select the “Destination” Tab. ”. Enter in the SA/pass combination as well as the PRODUCTION database from the drop-down. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;f. Select the “Copy” Tab. UNCHECK the “Create destination objects” box. UNCHECK the “Copy all objects” box and then Click on the “Select Objects” Button. This brings up the “Select Objects” screen.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;g. CHECK ONLY “Show all tables” like shown above. Then check each table that needs to be exported. If ALL tables need to be export, Click on the “Select All” button. Click OK.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;h. Click OK again and we are done creating this task. Now we execute the package by Clicking the green arrow on the menu bar. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;REF : &lt;/span&gt;&lt;a href="http://www.tek-tips.com/"&gt;&lt;span style="font-family:trebuchet ms;"&gt;http://www.tek-tips.com/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-4418189603197471572?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/4418189603197471572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=4418189603197471572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/4418189603197471572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/4418189603197471572'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/how-to-recover-suspected-database-in.html' title='How to Recover Suspected Database in SQL Server 2000'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-7471253368174382952</id><published>2009-04-14T21:19:00.001+05:30</published><updated>2009-07-10T23:21:06.133+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Satellite Assembly'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Culture'/><title type='text'>Localize Date and Time through Specific Culture</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;The DateTime structure provides methods that allow your applications to perform culture-sensitive operations on a DateTime type. An application can use the DateTimeFormatInfo class to format and display a DateTime type based on culture.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Following sample code displays the date and time in different cultures are as follows,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="color:#000099;"&gt;&lt;span style="color:#ff0000;"&gt;public void DateFormatDisplay()&lt;br /&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#006600;"&gt;&lt;span style="color:#009900;"&gt;//To get the Current culture information&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;Console.WriteLine(Thread.CurrentThread.CurrentCulture);&lt;br /&gt;DateTime dt = DateTime.Now;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#33cc00;"&gt;&lt;span style="color:#009900;"&gt;// Creates a CultureInfo for English in US.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;CultureInfo CulInf = new CultureInfo("en-US");&lt;br /&gt;Console.WriteLine(dt.ToString("d"));&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#009900;"&gt;// Creates a CultureInfo for German in Germany.&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;CulInf = new CultureInfo("de-DE");&lt;br /&gt;Console.WriteLine(dt.ToString("d", CulInf));&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;&lt;span style="color:#009900;"&gt;// Creates a CultureInfo for English in Great Britan.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;CulInf = new CultureInfo("en-GB");&lt;br /&gt;Console.WriteLine(dt.ToString("d", CulInf));&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt; &lt;/div&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;font-size:85%;"&gt;If Current date is 14-Apr-2009 then output of above coding are as follows,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;font-size:85%;"&gt;&lt;span style="color:#ff0000;"&gt;en-US&lt;br /&gt;4/14/2009&lt;br /&gt;14.04.2009&lt;br /&gt;14/04/2009&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-7471253368174382952?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/7471253368174382952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=7471253368174382952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7471253368174382952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/7471253368174382952'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/formatting-date-and-time-for-specific.html' title='Localize Date and Time through Specific Culture'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-9197429229163229843</id><published>2009-04-14T12:31:00.007+05:30</published><updated>2009-07-11T15:11:13.934+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Disable browser "Back" button</title><content type='html'>To avoid Back function in browser.&lt;br /&gt;You have to write the javascript in body of the Html coding..&lt;br /&gt;In body tag,you have to specify the current page name. Let us consider below pages a 'Dynamic.html',in this example we mention &lt;span style="color:#3333ff;"&gt;&lt;em&gt;onunload&lt;/em&gt; &lt;span style="color:#000000;"&gt;we specified the&lt;/span&gt; &lt;/span&gt;&lt;span style="color:#000000;"&gt;javascript to locate the same page.&lt;/span&gt;&lt;br /&gt;Save this html page as &lt;span style="color:#3333ff;"&gt;&lt;em&gt;'Dynamic.html'&lt;/em&gt;&lt;/span&gt; and find it how it works.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;title&amp;gt;Dyanmic Coding...&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;body onunload="javascript:window.location.replace('Dynamic.html')"&amp;gt; &amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;/html&amp;gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;we can apply this approach in Transaction page.in other words Next to Login page.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-9197429229163229843?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/9197429229163229843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=9197429229163229843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/9197429229163229843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/9197429229163229843'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/disable-browser-back-button.html' title='Disable browser &quot;Back&quot; button'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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-1659674788540926262.post-6535626491318113775</id><published>2009-04-14T11:26:00.006+05:30</published><updated>2009-07-14T21:11:38.538+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Script use to Scrolling title in browser.</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_3NZnKv5E_Ak/SeQngl_TmvI/AAAAAAAAAAc/2WwgGdwhnLw/s1600-h/1.JPG"&gt;&lt;/a&gt;Script use to Scrolling title in browser.&lt;a href="http://1.bp.blogspot.com/_3NZnKv5E_Ak/SeQnIdEptBI/AAAAAAAAAAU/Swg-E4Sq7t0/s1600-h/1.JPG"&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;Place this Javascript inside ur html code,&lt;/div&gt;&lt;div&gt;then u find your title dynamic coding moves from left to right....&lt;/div&gt;&lt;div&gt;Coding.....&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;html&amp;gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;title&amp;gt;Dynamic Coding...&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;script language="javascript" defer="defer" type="text/javascript"&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;!-- var repeat=0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;var title=document.title &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;var leng=title.length&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;var start=1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;function titlemove()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;titl= title.substring(0, start) &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;document.title=titl&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;start++&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;if (start==leng+1)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;start=1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;if (repeat==1)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;return&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;setTimeout("titlemove()",100)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;if (document.title)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;titlemove() &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;} &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;/script&amp;gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;body&amp;gt;Dynamic Coding..&amp;lt;/body&amp;gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1659674788540926262-6535626491318113775?l=dynamic-coding.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dynamic-coding.blogspot.com/feeds/6535626491318113775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1659674788540926262&amp;postID=6535626491318113775' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6535626491318113775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1659674788540926262/posts/default/6535626491318113775'/><link rel='alternate' type='text/html' href='http://dynamic-coding.blogspot.com/2009/04/script-use-to-scrolling-title-in.html' title='Script use to Scrolling title in browser.'/><author><name>Iyen</name><uri>http://www.blogger.com/profile/04877772488524734766</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>
