<?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:blogger='http://schemas.google.com/blogger/2008' 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-8813727818834904994</id><updated>2026-07-26T07:54:19.365-07:00</updated><category term="Anniversary alert"/><category term="Basic Chemistry Terms"/><category term="Basic English Course Syllabus to read"/><category term="Besic Chemistry Syllabus"/><category term="Besic Chemistry Syllabus upto 10th Standard Students"/><category term="Birthday alert"/><category term="Chemistry Important terms"/><category term="Computer Course"/><category term="Computer Learning"/><category term="Convert number into words in C sharp.Net"/><category term="Date based trial version Algo"/><category term="Date based trial version of window application software"/><category term="Dot Net as whole vs  by many institutes"/><category term="Easiest way to Learn computer"/><category term="Email and VB"/><category term="Email and Visual Basic"/><category term="Email from VB"/><category term="Email from VB6.0"/><category term="Email from Visual Basic"/><category term="Email via VB"/><category term="General English Syllabus"/><category term="How to convert number into words"/><category term="How to get list of clients from Database whose Birthday or Anniversary would come within the next few days"/><category term="How to quickly learn English as beginner"/><category term="How to read XML files via vb6.0"/><category term="How to send E-Mail from VB6.0 via Internet"/><category term="How to send SMS from VB"/><category term="How to send SMS from VB 6.0 via Internet"/><category term="OOPs Concepts in C#.NET"/><category term="OOPs concepts"/><category term="Quickly Revise PL/SQL used in SQL Server 2000/2005/2008"/><category term="Quickly revise OOPs concepts in C#.NET"/><category term="Read XML Files using vb6"/><category term="Read XML fiels from vb6.0"/><category term="SMS via VB"/><category term="SMS via VB6.0"/><category term="SMS via Visual Basic"/><category term="SQL Query Notes"/><category term="SQL Query Quick Revision"/><category term="SQL Query Revision"/><category term="SQL Query Summary"/><category term="Send  email from VB"/><category term="Send SMS from VB"/><category term="Send SMS from VB6.0"/><category term="Send SMS from Visual Basic"/><category term="VB and  Email"/><category term="Various SQL Query commands"/><category term="get Birthday and Anniversary Alert"/><category term="how to get Hard drive serial no via vb6"/><category term="how to read and write data in text files via vb.net"/><category term="understand English"/><category term="write"/><title type='text'>Arun Kakkar - Software Engineer</title><subtitle type='html'>Arun Kakkar - Software Engineer&#xa;experienced Software Professional in the area of application development and maintenance.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-3655130277333721838</id><published>2026-03-09T16:33:00.000-07:00</published><updated>2026-03-09T16:33:57.300-07:00</updated><title type='text'>Math Basics </title><content type='html'>&lt;style&gt;
  /* Container for the whole list */
  .curriculum-wrapper {
    max-width: 100%;
    margin: 10px auto;
    font-family: &#39;Segoe UI&#39;, Arial, sans-serif;
    color: #333;
    border: 1px solid #ccc;
    overflow-x: auto; /* Adds scrollbar only if table is too wide for tiny screens */
  }
  
  /* Table styling */
  .resp-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 300px;
  }
  
  .resp-table th, .resp-table td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: left;
    vertical-align: top;
  }

  /* Matching your Excel colors */
  .header-row {
    background-color: #ffff00 !important; /* Yellow */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .category-row {
    background-color: #92D050 !important; /* Green */
    font-weight: bold;
  }

  .sub-topic-cell {
    background-color: #f9f9f9;
    font-style: italic;
    font-size: 0.95em;
  }

  /* Note formatting */
  .desc-text {
    font-size: 0.85em;
    color: #555;
    margin-top: 5px;
    display: block;
    line-height: 1.4;
  }

  /* Mobile optimization */
  @media screen and (max-width: 600px) {
    .resp-table th, .resp-table td {
      padding: 8px;
      font-size: 14px;
    }
  }
&lt;/style&gt;

&lt;div class=&quot;curriculum-wrapper&quot;&gt;
  &lt;table class=&quot;resp-table&quot;&gt;
    &lt;thead&gt;
      &lt;tr class=&quot;header-row&quot;&gt;
        &lt;th style=&quot;width: 50%;&quot;&gt;Topic&lt;/th&gt;
        &lt;th style=&quot;width: 50%;&quot;&gt;Sub-Topic / Details&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;!-- Basic Numbers --&gt;
      &lt;tr&gt;
        &lt;td&gt;Tables till 30&lt;/td&gt;
        &lt;td class=&quot;sub-topic-cell&quot;&gt;Reference list for rapid calculation&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Squares till 30&lt;/td&gt;
        &lt;td class=&quot;sub-topic-cell&quot;&gt;Essential for Algebra/Geometry&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Square roots of 1, 2, 3, 4, 9&lt;/td&gt;
        &lt;td class=&quot;sub-topic-cell&quot;&gt;Common irrational &amp; rational roots&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Cubes till 11&lt;/td&gt;
        &lt;td class=&quot;sub-topic-cell&quot;&gt;Volume &amp; Algebra basics&lt;/td&gt;
      &lt;/tr&gt;

      &lt;!-- Complex Number Systems --&gt;
      &lt;tr class=&quot;category-row&quot;&gt;
        &lt;td colspan=&quot;2&quot;&gt;Types of Numbers &amp; Systems&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Real Numbers&lt;/strong&gt;
          &lt;span class=&quot;desc-text&quot;&gt;Includes all possible numbers on a continuous number line (rational + irrational).&lt;/span&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;strong&gt;Rational Numbers&lt;/strong&gt;
          &lt;span class=&quot;desc-text&quot;&gt;Fractions with terminating or repeating decimals (Integers &gt; Whole &gt; Natural).&lt;/span&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;td&gt;
          &lt;strong&gt;Irrational Numbers&lt;/strong&gt;
          &lt;span class=&quot;desc-text&quot;&gt;Cannot be expressed as fractions; non-repeating infinite decimals (e.g., &amp;pi;, &amp;radic;2, &amp;radic;10).&lt;/span&gt;
        &lt;/td&gt;
      &lt;/tr&gt;

      &lt;!-- Arithmetic &amp; Fractions --&gt;
      &lt;tr&gt;
        &lt;td&gt;Roman Numerals, Even, Odd, Prime, &amp; Composite&lt;/td&gt;
        &lt;td class=&quot;sub-topic-cell&quot;&gt;Classification and properties&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;strong&gt;Fractions (p/q)&lt;/strong&gt;&lt;/td&gt;
        &lt;td&gt;
          &lt;ul&gt;
            &lt;li&gt;Proper (Numerator &lt; Denominator)&lt;/li&gt;
            &lt;li&gt;Improper (Numerator &gt; Denominator)&lt;/li&gt;
            &lt;li&gt;Mixed Numbers&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;!-- Decimals &amp; Roots --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Decimals, Powers &amp;amp; Roots&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Decimal&lt;/li&gt;
      &lt;li&gt;Indices (powers/exponents) (a raise to power b)&lt;/li&gt;
      &lt;li&gt;Surds (irrational roots or underroot)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Number Systems --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Number Systems &amp;amp; Notation&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Place value &amp;amp; expanded form&lt;/li&gt;
      &lt;li&gt;Number system (India &amp;amp; International) (reading &amp;amp; writing)&lt;/li&gt;
      &lt;li&gt;Scientific notation / Standard form&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Operations &amp; Rules --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Order of Operations &amp;amp; Rules&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Order of operations (BODMAS / BIDMAS / PEMDAS)&lt;/li&gt;
      &lt;li&gt;Divisibility Rules&lt;/li&gt;
      &lt;li&gt;BODMAS for Natural Numbers, Whole, Integer, Fractions, decimal, Indices, Surds&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Basic Arithmetic --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Arithmetic Foundations&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Unitary method&lt;/li&gt;
      &lt;li&gt;LCM, HCF, Factors, Multiples&lt;/li&gt;
      &lt;li&gt;Average (mean)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Ratio &amp; Applied Problems --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Ratios &amp;amp; Applied Math&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Ratio &amp;amp; Proportions&lt;/li&gt;
      &lt;li&gt;Ages problems&lt;/li&gt;
      &lt;li&gt;Time &amp;amp; work / Pipes &amp;amp; cisterns problems&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Commercial Math --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Commercial Mathematics&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;% &amp;amp; taxes&lt;/li&gt;
      &lt;li&gt;Interest (simple, compound)&lt;/li&gt;
      &lt;li&gt;Profit, loss, discount&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Speed &amp; Distance --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Motion &amp;amp; Speed&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Time, speed, distance&lt;/li&gt;
      &lt;li&gt;Boats &amp;amp; Trains problems&lt;/li&gt;
      &lt;li&gt;Streams (Upstream/Downstream)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt; 1       &lt;/td&gt;
       &lt;td&gt;     Numbers &amp; Number Systems   &lt;/td&gt;      
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt; 2       &lt;/td&gt;
       &lt;td&gt;     Arithmetic   &lt;/td&gt;      
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt; 3       &lt;/td&gt;
       &lt;td&gt;       Geometry &lt;/td&gt;      
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt; 4       &lt;/td&gt;
       &lt;td&gt;       Coordinate Geometry &lt;/td&gt;      
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt; 5       &lt;/td&gt;
       &lt;td&gt;       Mensuration (2D, 3D) &lt;/td&gt;      
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt; 6       &lt;/td&gt;
       &lt;td&gt;       Trigonometry &lt;/td&gt;      
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt; 7       &lt;/td&gt;
       &lt;td&gt;       Statistics &lt;/td&gt;      
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt; 8       &lt;/td&gt;
       &lt;td&gt; Probability       &lt;/td&gt;      
      &lt;/tr&gt;
      &lt;tr&gt;
      &lt;td&gt; 9       &lt;/td&gt;
       &lt;td&gt; Algebra       &lt;/td&gt;      
      &lt;/tr&gt;

      &lt;!-- Category Header --&gt;
&lt;tr class=&quot;category-row&quot;&gt;
  &lt;td colspan=&quot;2&quot;&gt;Numbers &amp;amp; Number Systems&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 1: Foundations --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Basic Number Concepts&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Counting, reading &amp;amp; writing numbers&lt;/li&gt;
      &lt;li&gt;Place value &amp;amp; expanded form&lt;/li&gt;
      &lt;li&gt;Even &amp;amp; odd numbers&lt;/li&gt;
      &lt;li&gt;Factors, multiples, prime &amp;amp; composite numbers&lt;/li&gt;
      &lt;li&gt;HCF &amp;amp; LCM&lt;/li&gt;
      &lt;li&gt;Divisibility rules&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 2: Number Types --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Number Classification&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Fractions &amp;mdash; types, operations, comparison&lt;/li&gt;
      &lt;li&gt;Decimals &amp;mdash; operations &amp;amp; conversion&lt;/li&gt;
      &lt;li&gt;Integers &amp;amp; negative numbers&lt;/li&gt;
      &lt;li&gt;Rational numbers &amp;mdash; properties &amp;amp; operations&lt;/li&gt;
      &lt;li&gt;Irrational numbers &amp;amp; real numbers&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 3: Advanced Theory --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Exponents &amp;amp; Theorems&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Square roots &amp;amp; cube roots&lt;/li&gt;
      &lt;li&gt;Surds, indices &amp;amp; laws of exponents&lt;/li&gt;
      &lt;li&gt;Scientific notation / Standard form&lt;/li&gt;
      &lt;li&gt;Euclid&#39;s Lemma &amp;amp; Fundamental Theorem of Arithmetic&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

      &lt;!-- Category Header --&gt;
&lt;tr class=&quot;category-row&quot;&gt;
  &lt;td colspan=&quot;2&quot;&gt;Arithmetic&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 1: Arithmetic Foundations --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Basic Operations &amp;amp; Rules&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Basic operations &amp;mdash; addition, subtraction, multiplication, division&lt;/li&gt;
      &lt;li&gt;Order of operations (BODMAS / BIDMAS / PEMDAS)&lt;/li&gt;
      &lt;li&gt;Roman numerals&lt;/li&gt;
      &lt;li&gt;Unitary method&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 2: Commercial Mathematics --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Commercial Concepts&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Ratio &amp;amp; proportion&lt;/li&gt;
      &lt;li&gt;Percentage&lt;/li&gt;
      &lt;li&gt;Profit, loss &amp;amp; discount&lt;/li&gt;
      &lt;li&gt;Simple interest &amp;amp; compound interest&lt;/li&gt;
      &lt;li&gt;Average (Mean)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 3: Applied Arithmetic --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Applied Word Problems&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Time &amp;amp; work / Pipes &amp;amp; cisterns&lt;/li&gt;
      &lt;li&gt;Time, speed &amp;amp; distance&lt;/li&gt;
      &lt;li&gt;Trains, boats &amp;amp; streams (applied speed problems)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 4: Business &amp; Financial Literacy --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Business &amp;amp; Real-world Math&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Partnership&lt;/li&gt;
      &lt;li&gt;Mixture &amp;amp; alligation&lt;/li&gt;
      &lt;li&gt;Ages problems&lt;/li&gt;
      &lt;li&gt;Financial literacy (budgeting, tax, GST, bills)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;
&lt;!-- Category Header --&gt;
&lt;tr class=&quot;category-row&quot; style=&quot;background-color: #ffff00;&quot;&gt;
  &lt;td colspan=&quot;2&quot;&gt;Geometry&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 1: Lines &amp; Basics --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Geometric Foundations&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Basic 2D &amp;amp; 3D shape recognition&lt;/li&gt;
      &lt;li&gt;Lines, line segments, rays &amp;amp; angle types&lt;/li&gt;
      &lt;li&gt;Parallel lines &amp;amp; transversals&lt;/li&gt;
      &lt;li&gt;Symmetry &amp;amp; reflection&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 2: Polygons --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Polygons &amp;amp; Triangles&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Triangles &amp;mdash; types, properties, congruence&lt;/li&gt;
      &lt;li&gt;Quadrilaterals &amp;mdash; types &amp;amp; properties&lt;/li&gt;
      &lt;li&gt;Polygons &amp;mdash; interior &amp;amp; exterior angles&lt;/li&gt;
      &lt;li&gt;Similarity of triangles &amp;amp; Basic Proportionality Theorem (BPT)&lt;/li&gt;
      &lt;li&gt;Pythagoras theorem &amp;amp; applications&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 3: Circles &amp; Constructions --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Circles &amp;amp; Drafting&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Circles &amp;mdash; chord, arc, tangent, angles, secant&lt;/li&gt;
      &lt;li&gt;Circle theorems&lt;/li&gt;
      &lt;li&gt;Geometric constructions with compass &amp;amp; straightedge&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 4: Advanced Geometry --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Transformations &amp;amp; Proofs&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Congruence, similarity &amp;amp; transformations (rotation, reflection, translation)&lt;/li&gt;
      &lt;li&gt;Vectors &amp;mdash; introduction&lt;/li&gt;
      &lt;li&gt;Geometric proof (Euclidean)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;
&lt;!-- Category Header --&gt;
&lt;tr class=&quot;category-row&quot; style=&quot;background-color: #ffff00;&quot;&gt;
  &lt;td colspan=&quot;2&quot;&gt;Coordinate Geometry&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 1: Basics &amp; Plotting --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Points &amp;amp; Planes&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Plotting points on a number line&lt;/li&gt;
      &lt;li&gt;Cartesian plane &amp;mdash; axes, quadrants, plotting points&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 2: Coordinate Formulas --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Key Formulas&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Distance formula&lt;/li&gt;
      &lt;li&gt;Section / midpoint formula&lt;/li&gt;
      &lt;li&gt;Area of triangle using coordinates&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 3: Lines &amp; Functions --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Lines &amp;amp; Graphing&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Slope &amp;amp; equation of a straight line&lt;/li&gt;
      &lt;li&gt;Parallel &amp;amp; perpendicular lines (coordinate)&lt;/li&gt;
      &lt;li&gt;Graphing linear &amp;amp; quadratic functions&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

      &lt;!-- Category Header --&gt;
&lt;tr class=&quot;category-row&quot; style=&quot;background-color: #ffff00;&quot;&gt;
  &lt;td colspan=&quot;2&quot;&gt;Mensuration (2D, 3D)&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 1: 2D Shapes &amp; Circles --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;2D Shapes (Area &amp;amp; Perimeter)&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Perimeter of basic shapes&lt;/li&gt;
      &lt;li&gt;Area of square, rectangle, triangle&lt;/li&gt;
      &lt;li&gt;Area of parallelogram, rhombus, trapezium&lt;/li&gt;
      &lt;li&gt;Circumference &amp;amp; area of circle&lt;/li&gt;
      &lt;li&gt;Area of sector &amp;amp; segment&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 2: 3D Surface Area &amp; Volume --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;3D Solids &amp;amp; Volumes&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Surface area &amp;amp; volume &amp;mdash; cube &amp;amp; cuboid&lt;/li&gt;
      &lt;li&gt;Surface area &amp;amp; volume &amp;mdash; cylinder, cone, sphere, hemisphere&lt;/li&gt;
      &lt;li&gt;Combinations of solids &amp;amp; frustum of cone&lt;/li&gt;
      &lt;li&gt;Composite / compound figures&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

      &lt;!-- Category Header --&gt;
&lt;tr class=&quot;category-row&quot; style=&quot;background-color: #ffff00;&quot;&gt;
  &lt;td colspan=&quot;2&quot;&gt;Trigonometry&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 1: Ratios &amp; Identities --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Trig Foundations&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Trigonometric ratios &amp;mdash; sin, cos, tan (right triangles)&lt;/li&gt;
      &lt;li&gt;Trigonometric identities&lt;/li&gt;
      &lt;li&gt;Complementary angle relationships&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 2: Applications &amp; Advanced Rules --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Applications &amp;amp; Rules&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Heights &amp;amp; distances &amp;mdash; elevation &amp;amp; depression&lt;/li&gt;
      &lt;li&gt;Sine &amp;amp; cosine rules (non-right triangles)&lt;/li&gt;
      &lt;li&gt;Bearings &amp;amp; directions&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

      &lt;!-- Category Header --&gt;
&lt;tr class=&quot;category-row&quot; style=&quot;background-color: #ffff00;&quot;&gt;
  &lt;td colspan=&quot;2&quot;&gt;Statistics&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 1: Data Collection &amp; Basic Graphs --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Data Representation&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Data collection &amp;amp; tally marks&lt;/li&gt;
      &lt;li&gt;Pictographs &amp;amp; bar graphs&lt;/li&gt;
      &lt;li&gt;Pie charts &amp;amp; line graphs&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 2: Measures of Center &amp; Spread --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Central Tendency &amp;amp; Spread&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Mean, median, mode for ungrouped data&lt;/li&gt;
      &lt;li&gt;Mean, median, mode for grouped data&lt;/li&gt;
      &lt;li&gt;Range, IQR &amp;amp; measures of spread&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 3: Advanced Distribution &amp; Analysis --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Statistical Analysis&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Histograms, box plots &amp;amp; cumulative frequency&lt;/li&gt;
      &lt;li&gt;Scatter plots, correlation &amp;amp; line of best fit&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 4: Interpretation &amp; Tables --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Applied Statistics&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Data Interpretation (tables, charts &amp;mdash; applied)&lt;/li&gt;
      &lt;li&gt;Two-way tables &amp;amp; categorical data&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

      &lt;!-- Category Header --&gt;
&lt;tr class=&quot;category-row&quot; style=&quot;background-color: #ffff00;&quot;&gt;
  &lt;td colspan=&quot;2&quot;&gt;Probability&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 1: Basic Concepts --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Probability Foundations&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Basic concept &amp;mdash; likely, unlikely, equally likely&lt;/li&gt;
      &lt;li&gt;Probability scale 0 to 1&lt;/li&gt;
      &lt;li&gt;Classical definition of probability&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 2: Types &amp; Events --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Probability Types &amp;amp; Events&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Experimental vs theoretical probability&lt;/li&gt;
      &lt;li&gt;Simple &amp;amp; compound events, complementary events&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 3: Diagrams &amp; Advanced Intro --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Tools &amp;amp; Advanced Theory&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Tree diagrams &amp;amp; Venn diagrams&lt;/li&gt;
      &lt;li&gt;Conditional probability (basic)&lt;/li&gt;
      &lt;li&gt;Combinatorics / counting principles (intro)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

     &lt;!-- Category Header --&gt;
&lt;tr class=&quot;category-row&quot; style=&quot;background-color: #ffff00;&quot;&gt;
  &lt;td colspan=&quot;2&quot;&gt;Algebra&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 1: Algebraic Foundations --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Algebraic Basics&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Introduction to variables &amp;amp; algebraic expressions&lt;/li&gt;
      &lt;li&gt;Exponents &amp;amp; powers&lt;/li&gt;
      &lt;li&gt;Algebraic identities&lt;/li&gt;
      &lt;li&gt;Factorisation of algebraic expressions&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 2: Linear Equations --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Linear Equations&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Linear equations &amp;mdash; one variable&lt;/li&gt;
      &lt;li&gt;Linear equations &amp;mdash; two variables &amp;amp; graphing&lt;/li&gt;
      &lt;li&gt;Pair of linear equations &amp;mdash; graphical &amp;amp; algebraic methods&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 3: Polynomials &amp;amp; Quadratics --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Higher Degree Equations&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Polynomials &amp;mdash; zeros, remainder &amp;amp; factor theorem&lt;/li&gt;
      &lt;li&gt;Quadratic equations &amp;mdash; factorising, formula, discriminant&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;

&lt;!-- Part 4: Advanced Algebra --&gt;
&lt;tr&gt;
  &lt;td&gt;&lt;strong&gt;Advanced Topics&lt;/strong&gt;&lt;/td&gt;
  &lt;td&gt;
    &lt;ul&gt;
      &lt;li&gt;Inequalities &amp;mdash; linear&lt;/li&gt;
      &lt;li&gt;Functions &amp;mdash; definition, notation, linear functions&lt;/li&gt;
      &lt;li&gt;Sequences &amp;mdash; arithmetic &amp;amp; geometric&lt;/li&gt;
      &lt;li&gt;Algebraic fractions&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/td&gt;
&lt;/tr&gt;
 
      
      
      
      &lt;!-- Complete Multiplication Tables Section (2 to 30) --&gt;
&lt;tr&gt;
  &lt;td style=&quot;background-color: #fffde7; font-weight: bold; width: 25%; vertical-align: middle;&quot;&gt;
    &lt;strong&gt;Multiplication Tables (2 to 30)&lt;/strong&gt;
    &lt;div style=&quot;font-size: 10px; color: #666; margin-top: 10px; font-weight: normal;&quot;&gt;
      * Swipe left/right to view all columns (x1 to x10)
    &lt;/div&gt;
  &lt;/td&gt;
  &lt;td style=&quot;padding: 0;&quot;&gt;
    &lt;div style=&quot;overflow-x: auto; -webkit-overflow-scrolling: touch;&quot;&gt;
      &lt;table style=&quot;width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 12px; text-align: center; min-width: 600px;&quot;&gt;
        &lt;thead&gt;
          &lt;tr style=&quot;background-color: #ffff00; font-weight: bold;&quot;&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;Table&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;x1&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;x2&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;x3&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;x4&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;x5&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;x6&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;x7&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;x8&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;x9&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 8px;&quot;&gt;x10&lt;/th&gt;
          &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
          &lt;!-- Table 2 to 30 --&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;2&lt;/b&gt;&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;3&lt;/b&gt;&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;4&lt;/b&gt;&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;5&lt;/b&gt;&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;6&lt;/b&gt;&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;48&lt;/td&gt;&lt;td&gt;54&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;7&lt;/b&gt;&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;35&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;49&lt;/td&gt;&lt;td&gt;56&lt;/td&gt;&lt;td&gt;63&lt;/td&gt;&lt;td&gt;70&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;8&lt;/b&gt;&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;48&lt;/td&gt;&lt;td&gt;56&lt;/td&gt;&lt;td&gt;64&lt;/td&gt;&lt;td&gt;72&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;9&lt;/b&gt;&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;td&gt;54&lt;/td&gt;&lt;td&gt;63&lt;/td&gt;&lt;td&gt;72&lt;/td&gt;&lt;td&gt;81&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;10&lt;/b&gt;&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;70&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;11&lt;/b&gt;&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;td&gt;33&lt;/td&gt;&lt;td&gt;44&lt;/td&gt;&lt;td&gt;55&lt;/td&gt;&lt;td&gt;66&lt;/td&gt;&lt;td&gt;77&lt;/td&gt;&lt;td&gt;88&lt;/td&gt;&lt;td&gt;99&lt;/td&gt;&lt;td&gt;110&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;12&lt;/b&gt;&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;48&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;72&lt;/td&gt;&lt;td&gt;84&lt;/td&gt;&lt;td&gt;96&lt;/td&gt;&lt;td&gt;108&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;13&lt;/b&gt;&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;td&gt;39&lt;/td&gt;&lt;td&gt;52&lt;/td&gt;&lt;td&gt;65&lt;/td&gt;&lt;td&gt;78&lt;/td&gt;&lt;td&gt;91&lt;/td&gt;&lt;td&gt;104&lt;/td&gt;&lt;td&gt;117&lt;/td&gt;&lt;td&gt;130&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;14&lt;/b&gt;&lt;/td&gt;&lt;td&gt;14&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;56&lt;/td&gt;&lt;td&gt;70&lt;/td&gt;&lt;td&gt;84&lt;/td&gt;&lt;td&gt;98&lt;/td&gt;&lt;td&gt;112&lt;/td&gt;&lt;td&gt;126&lt;/td&gt;&lt;td&gt;140&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;15&lt;/b&gt;&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;45&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;75&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;105&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;135&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;16&lt;/b&gt;&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;td&gt;48&lt;/td&gt;&lt;td&gt;64&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;96&lt;/td&gt;&lt;td&gt;112&lt;/td&gt;&lt;td&gt;128&lt;/td&gt;&lt;td&gt;144&lt;/td&gt;&lt;td&gt;160&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;17&lt;/b&gt;&lt;/td&gt;&lt;td&gt;17&lt;/td&gt;&lt;td&gt;34&lt;/td&gt;&lt;td&gt;51&lt;/td&gt;&lt;td&gt;68&lt;/td&gt;&lt;td&gt;85&lt;/td&gt;&lt;td&gt;102&lt;/td&gt;&lt;td&gt;119&lt;/td&gt;&lt;td&gt;136&lt;/td&gt;&lt;td&gt;153&lt;/td&gt;&lt;td&gt;170&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;18&lt;/b&gt;&lt;/td&gt;&lt;td&gt;18&lt;/td&gt;&lt;td&gt;36&lt;/td&gt;&lt;td&gt;54&lt;/td&gt;&lt;td&gt;72&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;108&lt;/td&gt;&lt;td&gt;126&lt;/td&gt;&lt;td&gt;144&lt;/td&gt;&lt;td&gt;162&lt;/td&gt;&lt;td&gt;180&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;19&lt;/b&gt;&lt;/td&gt;&lt;td&gt;19&lt;/td&gt;&lt;td&gt;38&lt;/td&gt;&lt;td&gt;57&lt;/td&gt;&lt;td&gt;76&lt;/td&gt;&lt;td&gt;95&lt;/td&gt;&lt;td&gt;114&lt;/td&gt;&lt;td&gt;133&lt;/td&gt;&lt;td&gt;152&lt;/td&gt;&lt;td&gt;171&lt;/td&gt;&lt;td&gt;190&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;20&lt;/b&gt;&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;40&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;140&lt;/td&gt;&lt;td&gt;160&lt;/td&gt;&lt;td&gt;180&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;21&lt;/b&gt;&lt;/td&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;63&lt;/td&gt;&lt;td&gt;84&lt;/td&gt;&lt;td&gt;105&lt;/td&gt;&lt;td&gt;126&lt;/td&gt;&lt;td&gt;147&lt;/td&gt;&lt;td&gt;168&lt;/td&gt;&lt;td&gt;189&lt;/td&gt;&lt;td&gt;210&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;22&lt;/b&gt;&lt;/td&gt;&lt;td&gt;22&lt;/td&gt;&lt;td&gt;44&lt;/td&gt;&lt;td&gt;66&lt;/td&gt;&lt;td&gt;88&lt;/td&gt;&lt;td&gt;110&lt;/td&gt;&lt;td&gt;132&lt;/td&gt;&lt;td&gt;154&lt;/td&gt;&lt;td&gt;176&lt;/td&gt;&lt;td&gt;198&lt;/td&gt;&lt;td&gt;220&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;23&lt;/b&gt;&lt;/td&gt;&lt;td&gt;23&lt;/td&gt;&lt;td&gt;46&lt;/td&gt;&lt;td&gt;69&lt;/td&gt;&lt;td&gt;92&lt;/td&gt;&lt;td&gt;115&lt;/td&gt;&lt;td&gt;138&lt;/td&gt;&lt;td&gt;161&lt;/td&gt;&lt;td&gt;184&lt;/td&gt;&lt;td&gt;207&lt;/td&gt;&lt;td&gt;230&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;24&lt;/b&gt;&lt;/td&gt;&lt;td&gt;24&lt;/td&gt;&lt;td&gt;48&lt;/td&gt;&lt;td&gt;72&lt;/td&gt;&lt;td&gt;96&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;144&lt;/td&gt;&lt;td&gt;168&lt;/td&gt;&lt;td&gt;192&lt;/td&gt;&lt;td&gt;216&lt;/td&gt;&lt;td&gt;240&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;25&lt;/b&gt;&lt;/td&gt;&lt;td&gt;25&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;td&gt;75&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;125&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;175&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;225&lt;/td&gt;&lt;td&gt;250&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;26&lt;/b&gt;&lt;/td&gt;&lt;td&gt;26&lt;/td&gt;&lt;td&gt;52&lt;/td&gt;&lt;td&gt;78&lt;/td&gt;&lt;td&gt;104&lt;/td&gt;&lt;td&gt;130&lt;/td&gt;&lt;td&gt;156&lt;/td&gt;&lt;td&gt;182&lt;/td&gt;&lt;td&gt;208&lt;/td&gt;&lt;td&gt;234&lt;/td&gt;&lt;td&gt;260&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;27&lt;/b&gt;&lt;/td&gt;&lt;td&gt;27&lt;/td&gt;&lt;td&gt;54&lt;/td&gt;&lt;td&gt;81&lt;/td&gt;&lt;td&gt;108&lt;/td&gt;&lt;td&gt;135&lt;/td&gt;&lt;td&gt;162&lt;/td&gt;&lt;td&gt;189&lt;/td&gt;&lt;td&gt;216&lt;/td&gt;&lt;td&gt;243&lt;/td&gt;&lt;td&gt;270&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;28&lt;/b&gt;&lt;/td&gt;&lt;td&gt;28&lt;/td&gt;&lt;td&gt;56&lt;/td&gt;&lt;td&gt;84&lt;/td&gt;&lt;td&gt;112&lt;/td&gt;&lt;td&gt;140&lt;/td&gt;&lt;td&gt;168&lt;/td&gt;&lt;td&gt;196&lt;/td&gt;&lt;td&gt;224&lt;/td&gt;&lt;td&gt;252&lt;/td&gt;&lt;td&gt;280&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #e2efda;&quot;&gt;&lt;td&gt;&lt;b&gt;29&lt;/b&gt;&lt;/td&gt;&lt;td&gt;29&lt;/td&gt;&lt;td&gt;58&lt;/td&gt;&lt;td&gt;87&lt;/td&gt;&lt;td&gt;116&lt;/td&gt;&lt;td&gt;145&lt;/td&gt;&lt;td&gt;174&lt;/td&gt;&lt;td&gt;203&lt;/td&gt;&lt;td&gt;232&lt;/td&gt;&lt;td&gt;261&lt;/td&gt;&lt;td&gt;290&lt;/td&gt;&lt;/tr&gt;
          &lt;tr style=&quot;background-color: #deeaf6;&quot;&gt;&lt;td&gt;&lt;b&gt;30&lt;/b&gt;&lt;/td&gt;&lt;td&gt;30&lt;/td&gt;&lt;td&gt;60&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;180&lt;/td&gt;&lt;td&gt;210&lt;/td&gt;&lt;td&gt;240&lt;/td&gt;&lt;td&gt;270&lt;/td&gt;&lt;td&gt;300&lt;/td&gt;&lt;/tr&gt;
        &lt;/tbody&gt;
      &lt;/table&gt;
    &lt;/div&gt;
  &lt;/td&gt;
&lt;/tr&gt;

      
      &lt;!-- Squares, Cubes &amp; Square Roots Section --&gt;
&lt;tr&gt;
  &lt;td style=&quot;background-color: #fffde7; font-weight: bold; width: 25%; vertical-align: middle;&quot;&gt;
    &lt;strong&gt;Powers &amp;amp; Roots Reference&lt;/strong&gt;
    &lt;div style=&quot;font-size: 10px; color: #666; margin-top: 10px; font-weight: normal;&quot;&gt;
      * Squares (1-30), Cubes (1-11), &amp;amp; Key Square Roots
    &lt;/div&gt;
  &lt;/td&gt;
  &lt;td style=&quot;padding: 0;&quot;&gt;
    &lt;div style=&quot;overflow-x: auto; -webkit-overflow-scrolling: touch;&quot;&gt;
      &lt;table style=&quot;width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 12px; text-align: center; min-width: 450px;&quot;&gt;
        &lt;thead&gt;
          &lt;tr style=&quot;background-color: #ffff00; font-weight: bold;&quot;&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 6px; width: 15%;&quot;&gt;No.&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 6px; width: 25%;&quot;&gt;Squares&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 6px; width: 30%; background-color: #e2efda;&quot;&gt;Cubes&lt;/th&gt;
            &lt;th style=&quot;border: 1px solid #ccc; padding: 6px; width: 30%;&quot;&gt;Square Root&lt;/th&gt;
          &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
          &lt;!-- Complete Data Rows 1 to 30 --&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;1&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;1&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;1&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;1&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;2&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;4&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;8&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;1.4142&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;3&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;9&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;27&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;1.732&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;4&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;16&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;64&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;2&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;5&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;25&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;125&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;6&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;36&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;216&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;7&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;49&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;343&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;8&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;64&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;512&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;9&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;81&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;729&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;3&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;10&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;100&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;1000&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;11&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;121&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;1331&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;12&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;144&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;13&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;169&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;14&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;196&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;15&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;225&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;16&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;256&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;17&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;289&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;18&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;324&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;19&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;361&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;20&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;400&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;21&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;441&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;22&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;484&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;23&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;529&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;24&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;576&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;25&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;625&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;26&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;676&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;27&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;729&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;28&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;784&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;29&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;841&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #deeaf6;&quot;&gt;30&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;900&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc; background: #e2efda;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border: 1px solid #ccc;&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
        &lt;/tbody&gt;
      &lt;/table&gt;
    &lt;/div&gt;
  &lt;/td&gt;
&lt;/tr&gt;

      
      
      
    &lt;/tbody&gt;
  &lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/3655130277333721838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2026/03/math-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/3655130277333721838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/3655130277333721838'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2026/03/math-basics.html' title='Math Basics '/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-5575410608620930594</id><published>2012-10-11T11:18:00.001-07:00</published><updated>2012-10-11T11:18:45.104-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="How to read XML files via vb6.0"/><category scheme="http://www.blogger.com/atom/ns#" term="Read XML fiels from vb6.0"/><category scheme="http://www.blogger.com/atom/ns#" term="Read XML Files using vb6"/><title type='text'>How to read XML files using vb6.0</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;h2&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: blue;&quot;&gt;RAM RAM Friends&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;br /&gt;
After a very very long time, I got very few moments to share my knowledge.&lt;br /&gt;
&lt;h3&gt;
Here is how we can read, write etc from/to XML files using vb6.0&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;b&gt;Step 1&lt;/b&gt;&amp;nbsp;&amp;gt;&amp;gt; Set Reference to &quot;&lt;b&gt;Microsoft XML, v2.6&lt;/b&gt;&quot; as below&lt;/h4&gt;
Project Menu&amp;gt;References&amp;gt;select &quot;Microsoft XML, v2.6&quot;&amp;gt;OK&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;b&gt;Step 2 &amp;gt;&amp;gt;&lt;/b&gt;&amp;nbsp;Have any one XML file to read data from it.&lt;/h4&gt;
&amp;nbsp; Below is the sample file I Used in this sample program&lt;br /&gt;
&lt;br /&gt;
test.xml&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;check&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;header&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;outlet&amp;gt; AK &amp;lt;/outlet&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;profilename&amp;gt; ARUN KAKKAR &amp;lt;/profilename&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/header&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;lt;item&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;code&amp;gt; C1 &amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;name&amp;gt; ITEM 1 &amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;qty&amp;gt; 2 &amp;lt;/qty&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/item&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;lt;item&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;code&amp;gt; C2 &amp;lt;/code&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;name&amp;gt; ITEM 2 &amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;qty&amp;gt; 5 &amp;lt;/qty&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;lt;/item&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;/check&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Step 3&lt;/b&gt; &amp;gt; &amp;nbsp;Make procedure to read the file&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Private sub ParseXMLDoc_ak()&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Dim doc as new MSXML2.DOMDocument&lt;/li&gt;
&lt;li&gt;Dim bsuccess as boolean, s as string , s2 as string&lt;/li&gt;
&lt;li&gt;bsuccess=doc.Load(App.Path &amp;amp; &quot;\ test.xml&quot;)&lt;/li&gt;
&lt;li&gt;if bsuccess=false then&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;msgbox doc.parseError.reason&lt;/li&gt;
&lt;li&gt;exit sub&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;end if&lt;/li&gt;
&lt;li&gt;Dim n1 as MSXML2.IXMLDOMNode&lt;/li&gt;
&lt;li&gt;Dim n2 as MSXML2.IXMLDOMNode&lt;/li&gt;
&lt;li&gt;Dim n3 as MSXML2.IXMLDOMNode&lt;/li&gt;
&lt;li&gt;Dim i as Integer&amp;nbsp;&lt;/li&gt;
&lt;li&gt;s=&quot;SrNo &amp;nbsp; &amp;nbsp;Code &amp;nbsp; &amp;nbsp;Name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Qty&quot;&lt;/li&gt;
&lt;li&gt;For Each n1 in doc.childNodes&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;n1=RootNode eg. CHECK&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;For Each n2 In n1.childNodes&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;n2=1st Level child node i.e. child of n1 , e.g. ITEM, HEADER&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;If UCase(n2.nodeName)=&quot;ITEM&quot; or UCase(n2.nodeName)=&quot;HEADER&quot; Then&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;For Each n3 in n2.childNodes&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;n3=2nd Level child Node i.e. child of n2 e.g. OUTLET, &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39; &amp;nbsp;PROFILENAME,CODE, QTY, NAME&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Select Case UCase(n3.nodeName)&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Case &quot;OUTLET&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;s2=s2&amp;nbsp;&amp;amp;&amp;nbsp;&amp;nbsp;vbcrlf &amp;amp; &quot;Outlet=&quot; &amp;amp; n3.Text&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Case &quot;PROFILENAME&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;s2=s2 &amp;amp; &quot; &amp;nbsp;&quot; &amp;amp; &quot;Profile Name=&quot; &amp;amp; n3.Text&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Case &quot;CODE&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;i=i+1 &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;s=s &amp;amp; vbcrlf &amp;amp; i &amp;amp; &quot; &quot; &amp;amp; n3.Text&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Case &quot;NAME&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;s=s &amp;amp; &quot; &amp;nbsp;&quot; &amp;amp; n3.Text&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Case &quot;QTY&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;s=s &amp;amp; &quot; &amp;nbsp;&quot; &amp;amp; val(n3.Text)&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;End Select&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Next n3&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;End if&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Next n2&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Next n1&lt;/li&gt;
&lt;li&gt;if s &amp;lt;&amp;gt;; &quot;&quot; then MsgBox s2 &amp;amp; vbcrlf &amp;amp; s&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;End Sub &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;Step 4&lt;/b&gt; &amp;gt;&amp;nbsp;Below would be the output of above code&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Outlet= AK &amp;nbsp; &amp;nbsp; &amp;nbsp;Profile Name=ARUN KAKKAR&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;SrNo &amp;nbsp; &amp;nbsp; &amp;nbsp;Code &amp;nbsp; &amp;nbsp; &amp;nbsp; Name &amp;nbsp; &amp;nbsp; &amp;nbsp;Qty&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;1 &amp;nbsp; &amp;nbsp; C1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ITEM 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;2 &amp;nbsp; &amp;nbsp; C2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ITEM 2 &amp;nbsp; &amp;nbsp; &amp;nbsp; 5 &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
1. The above code is just very minimal use of the various features provided by &quot;MSXML2 OBJECT&quot;&lt;br /&gt;
2. You can use other methods &amp;amp;amp; properties of this object to make it very easier to use xml in vb6.0&lt;br /&gt;
&lt;br /&gt;
I hope, it would help you in dealing with XML files in much more better way,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/5575410608620930594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2012/10/how-to-read-xml-files-using-vb60.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/5575410608620930594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/5575410608620930594'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2012/10/how-to-read-xml-files-using-vb60.html' title='How to read XML files using vb6.0'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-1491154306273502974</id><published>2011-08-04T23:30:00.000-07:00</published><updated>2011-08-04T23:46:29.396-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Quickly Revise PL/SQL used in SQL Server 2000/2005/2008"/><title type='text'>Quickly Revise PL/SQL used in SQL Server 2000/2005/2008</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime; font-size: x-large;&quot;&gt;RAM RAM Friends&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;Quickly Revise PL/SQL used in SQL Server 2000/2005/2008&lt;br /&gt;
&lt;br /&gt;
Following are the some of the important categories out of many for PL/SQL of SQL Server 2000/2005/2008&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;some important(frequently used)&amp;nbsp;Built-In Functions&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;some important(frequently used) Built-in Stored Procedures&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Stored procedures&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Functions (UDF) (User Defined Functions) &amp;amp; their types&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Triggers &amp;amp; their types&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000;&quot;&gt;Views&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;Note:&amp;gt;&amp;gt;&amp;gt;&amp;gt; Below I have just mentioned their use &amp;amp; very less description as this is only for quickly revise&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;create proc InsertTable1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@name nvarchar(50)=null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@image image=null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@myimage2 image=null&lt;br /&gt;
as&lt;br /&gt;
begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INSERT INTO Table1(name,image,myimage2) VALUES(@name,@image,@myimage2)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
drop proc updatetable1&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;create proc UpdateTable1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@name nvarchar(50),&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@image image,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@myimage2 image,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@id int&lt;br /&gt;
as&lt;br /&gt;
begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(@name is not null and @image is not null)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;UPDATE Table1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;SET name=@name,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;image=@image&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
USE arundb1&lt;br /&gt;
--==================&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;CREATE TABLE Countries&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
(&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CountryId INT IDENTITY PRIMARY KEY,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CountryName NVARCHAR(50) UNIQUE&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;CREATE TABLE States&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
(&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;StateId INT IDENTITY PRIMARY KEY,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;StateName NVARCHAR(50) NOT NULL,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CountryId INT FOREIGN KEY REFERENCES Countries(CountryId)&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;CREATE TABLE Cities&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
(&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CityId INT IDENTITY PRIMARY KEY,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CityName NVARCHAR(50) NOT NULL,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;StateId INT FOREIGN KEY REFERENCES States(StateId)&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
INSERT INTO Countries(CountryName)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT &#39;Country1&#39;&lt;br /&gt;
UNION ALL&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT &#39;Country2&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;CREATE PROC FillCountries&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
as&lt;br /&gt;
begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @CountryNo INT&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @cmd NVARCHAR(200)&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT @CountryNo=1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WHILE(@CountryNo&amp;lt;5)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SELECT @cmd=&#39;INSERT INTO Countries(CountryName) Values(&#39;&#39;Cnt&#39; + CONVERT(VARCHAR,@CountryNo) + &#39;&#39;&#39;)&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;EXEC(@cmd)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SELECT @CountryNo=@CountryNo + 1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;CREATE PROC FillStates&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
as&lt;br /&gt;
begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @StateNo INT&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @cmd NVARCHAR(200)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @CountryId INT&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE crsCountries CURSOR&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FOR&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SELECT CountryId FROM Countries&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;OPEN crsCountries&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FETCH NEXT FROM crsCountries INTO @CountryId&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WHILE(@@FETCH_STATUS=0) &amp;nbsp;--CountryId&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SELECT @StateNo=1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;WHILE(@StateNo&amp;lt;5) --insert 4 States&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;SELECT @cmd=&#39;INSERT INTO States(CountryId,StateName) VALUES(&#39;+ CONVERT(VARCHAR,@CountryId) + &#39;,&#39;&#39;Cnt&#39; + CONVERT(VARCHAR,@CountryId) + &#39;_Stat&#39; + CONVERT(VARCHAR,@StateNo) + &#39;&#39;&#39;)&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;EXEC(@cmd)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;SELECT @StateNo = @StateNo + 1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;end&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;FETCH NEXT FROM crsCountries INTO @CountryId&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CLOSE crsCountries&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DEALLOCATE crsCountries&lt;br /&gt;
end&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Create PROC FillCities&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
as&lt;br /&gt;
Begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @CountryId INT&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @StateId2 INT&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @CityNo INT&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @StateNo INT&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @cmd nvarchar(200)&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE crsCountries CURSOR&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FOR&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SELECT CountryId FROM Countries&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;OPEN crsCountries&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FETCH NEXT FROM crsCountries INTO @CountryId&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WHILE(@@FETCH_STATUS=0) &amp;nbsp;--Countryid&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;DECLARE &amp;nbsp;crsStates CURSOR&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;FOR&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;SELECT StateId FROM States&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;WHERE CountryId=@CountryId&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;OPEN crsStates&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;FETCH NEXT FROM crsStates INTO @StateId2&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SELECT @StateNo=1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;WHILE(@@FETCH_STATUS=0) -- StateId&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;begin&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;SELECT @CityNo=1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;WHILE(@CityNo&amp;lt;5)--insert 4 Cities&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;SELECT @cmd=&#39;INSERT INTO Cities(StateId,CityName) VALUES(&#39; + CONVERT(VARCHAR,@StateId2) + &#39;,&#39;&#39;Cont&#39; + CONVERT(VARCHAR,@CountryId) + &#39;_St&#39; + CONVERT(VARCHAR,@StateNo) + &#39;_City_&#39; + CONVERT(VARCHAR,@CityNo) + &#39;&#39;&#39;)&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;print @cmd&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;exec(@cmd)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;SELECT @CityNo=@CityNo +1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;end&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;FETCH NEXT FROM crsStates INTO @StateId2&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;SELECT @StateNo=@StateNo+1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if(@StateNo&amp;gt;4)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;SELECT @StateNo=1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;end&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;close crsStates&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;DEALLOCATE crsStates&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;FETCH NEXT FROM crsCountries INTO @CountryId&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CLOSE crsCountries&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DEALLOCATE crsCountries&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;SELECT * FROM Countries&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
SELECT * FROM States&lt;br /&gt;
SELECT * FROM Cities&lt;br /&gt;
exec fillCountries&lt;br /&gt;
EXEC FillStates&lt;br /&gt;
EXEC FillCities&lt;br /&gt;
DROP PROC FillCountries&lt;br /&gt;
DROP PROC FillStates&lt;br /&gt;
DROP PROC FillCities&lt;br /&gt;
CLOSE crsCountries&lt;br /&gt;
DEALLOCATE crsCountries&lt;br /&gt;
DEALLOCATE @StateId&lt;br /&gt;
DELETE Cities&lt;br /&gt;
INSERT INTO Cities(CityName,StateId) VALUES(&#39;ArunCity&#39;,17)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;sp_helptext usp_AddUpdateTaxes&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&#39; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Alter PROCEDURE [DBO].[USP_ADDUPDATETAXES]&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&#39;(&lt;/li&gt;
&lt;li&gt;&#39; &amp;nbsp;@TAXID &amp;nbsp;INT&lt;/li&gt;
&lt;li&gt;&#39; ,@TAXTYPE NVARCHAR(15)&lt;/li&gt;
&lt;li&gt;&#39; ,@TAXNAME NVARCHAR(MAX)&lt;/li&gt;
&lt;li&gt;&#39; ,@TAXVALUE NUMERIC&lt;/li&gt;
&lt;li&gt;&#39; ,@CUSTID INT&lt;/li&gt;
&lt;li&gt;&#39; ,@MINVAL NUMERIC&lt;/li&gt;
&lt;li&gt;&#39; ,@DESCR &amp;nbsp;NVARCHAR(300)&lt;/li&gt;
&lt;li&gt;&#39; ,@UNIT &amp;nbsp;NVARCHAR(20)&lt;/li&gt;
&lt;li&gt;&#39; ,@CURRENCY NVARCHAR(50)&lt;/li&gt;
&lt;li&gt;&#39; ,@TaxTypeHandling nvarchar(300)&lt;/li&gt;
&lt;li&gt;&#39;)&lt;/li&gt;
&lt;li&gt;&#39;AS&lt;/li&gt;
&lt;li&gt;&#39;BEGIN&lt;/li&gt;
&lt;li&gt;&#39; SET NOCOUNT ON;&lt;/li&gt;
&lt;li&gt;&#39;&lt;/li&gt;
&lt;li&gt;&#39; BEGIN TRAN&lt;/li&gt;
&lt;li&gt;&#39; &amp;nbsp;IF @TAXID=0&lt;/li&gt;
&lt;li&gt;&#39; &amp;nbsp; INSERT INTO TBL_TAXCHARGES(TAXTYPE,TAXNAME,TAXVALUE,CUSTID,MINVAL,DESCR,UNIT,CURRENCY,TaxTypeHandling) VALUES (@TAXTYPE,@TAXNAME,@TAXVALUE,@CUSTID,@MINVAL,@DESCR,@UNIT,@CURRENCY,@TaxTypeHandling)&lt;/li&gt;
&lt;li&gt;&#39; &amp;nbsp;Else&lt;/li&gt;
&lt;li&gt;&#39; &amp;nbsp; UPDATE TBL_TAXCHARGES SET TAXTYPE=@TAXTYPE,TAXNAME=@TAXNAME,TAXVALUE=@TAXVALUE,CUSTID=@CUSTID,MINVAL=@MINVAL,DESCR=@DESCR,UNIT=@UNIT,CURRENCY=@CURRENCY,TaxTypeHandling=@TaxTypeHandling WHERE TAXID=@TAXID&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&#39; &amp;nbsp;-- SET @p_CompanyID_out = SCOPE_IDENTITY()&lt;/li&gt;
&lt;li&gt;&#39;&lt;/li&gt;
&lt;li&gt;&#39; IF @@ERROR&amp;lt;&amp;gt;0&lt;/li&gt;
&lt;li&gt;&#39; &amp;nbsp;ROLLBACK TRAN&lt;/li&gt;
&lt;li&gt;&#39; Else&lt;/li&gt;
&lt;li&gt;&#39; &amp;nbsp;COMMIT TRAN&lt;/li&gt;
&lt;li&gt;&#39;&lt;/li&gt;
&lt;li&gt;&#39;End&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;CREATE TABLE AddressBook&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
(&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AddressId INT IDENTITY PRIMARY KEY,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MyName nvarchar(250) null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ContactNo nvarchar(50) null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Address nvarchar(300) null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Photo image null&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
select * from AddressBook&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;CREATE PROCEDURE spInsertAddressBook&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Id int output,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@name nvarchar(250)=null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@ContactNo nvarchar(50) =null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Address nvarchar(300)=null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Photo image=null&lt;br /&gt;
AS&lt;br /&gt;
BEGIN&lt;br /&gt;
INSERT INTO AddressBook(MyName,ContactNo,Address,Photo) VALUES(@name,@ContactNo, @Address,@Photo);&lt;br /&gt;
SELECT @Id=SCOPE_IDENTITY()&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;ALTER PROC spInsertAddressBook&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Id int Output,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@MyName nvarchar(250)=null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@ContactNo nvarchar(50)=null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Address nvarchar(300)=null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Photo image=null&lt;br /&gt;
AS&lt;br /&gt;
BEGIN&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INSERT INTO AddressBook(MyName,ContactNo,Address,Photo) VALUES(@MyName,@ContactNo,@Address,@Photo);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT @Id=SCOPE_IDENTITY();&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
declare @myid int&lt;br /&gt;
EXEC spInsertaddressbook @myid output,&#39;abc&#39;, &#39;a&#39;, &#39;a&#39;&lt;br /&gt;
select @myid&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--below is named paramerised sp calling&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
declare @myid int&lt;br /&gt;
exec spinsertaddressbook @id=@myid output,@myname=&#39;a&#39;,@contactno=&#39;aa&#39;&lt;br /&gt;
select @myid&lt;br /&gt;
select * from AddressBook&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;-- &amp;nbsp; Attaching a DB&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
use master ; EXEC sp_attach_db @dbname = &#39;ArunDB1&#39;,&lt;br /&gt;
&amp;nbsp; @filename1 = &#39;C:\Program Files\Microsoft SQL Server\MSSQL.4\MSSQL\Data\ArunDB1.mdf&#39;,&lt;br /&gt;
&amp;nbsp; @filename2 = &#39;C:\Program Files\Microsoft SQL Server\MSSQL.4\MSSQL\Data\ArunDB1_log.ldf&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;create table myTable1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
(&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;myId int Identity Primary Key,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FName nvarchar(200) null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LName nvarchar(200) null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Age numeric(3) null&lt;br /&gt;
)&lt;br /&gt;
insert into myTable1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;select &#39;F_Ram1&#39;, &#39;L_Ram1&#39;,20&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;union all&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;select &#39;F_Ram2&#39;, &#39;L_Ram2&#39;, 21&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;union all&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;select &#39;F_Ram3&#39;, &#39;L_Ram3&#39;, 22&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;union all&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;select &#39;F_Ram4&#39;,&#39;L_Ram4&#39;,23&lt;br /&gt;
&lt;br /&gt;
select * from mytable1&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Select * from SysDataBases&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;select * from SysObjects&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--P &amp;nbsp;= SP&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--FN = Scalar-valued UDF&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--IF = Inline-Table Valued UDF&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--TF = Multi-Statement Table-Valued UDF&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--TR = Trigger&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--V &amp;nbsp;= View&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--U == User Defined Tables&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
GO&lt;br /&gt;
if object_id(&#39;mysp1&#39;,&#39;P&#39;) is not null --mostly used now a days &amp;nbsp;also working in SQL 2K but not at all places&lt;br /&gt;
--if exists(select name from sysobjects where name=&#39;mysp1&#39; and type=&#39;P&#39;) --mostly used in SQL 2k but still working in SQL 2K5&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;drop proc mysp1&lt;br /&gt;
GO &amp;nbsp;--needed since CREATE/ALTER must be first stmnt in batch query&lt;br /&gt;
create proc mysp1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@myFName nvarchar(200)=&#39;F%&#39;,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@myLName nvarchar(200)=&#39;L%&#39;&lt;br /&gt;
as&lt;br /&gt;
begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;select * from mytable1 where FName like @myFName and LName like @myLName&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
exec mysp1&lt;br /&gt;
exec mysp1 &#39;%&#39;,&#39;%&#39;&lt;br /&gt;
exec mysp1 &#39;F&#39;,&#39;L&#39;&lt;br /&gt;
exec mysp1 &#39;F%2&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--UDF User Defined functions---------------------&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--1. Scalar valued UDF---------&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Go&lt;br /&gt;
If object_id(&#39;GetMyAgeInYrs&#39;,&#39;FN&#39;) is not null&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;drop function GetMyAgeInYrs&lt;br /&gt;
Go&lt;br /&gt;
Create Function GetMyAgeInYrs (@myDOB datetime=&#39;07Apr1981&#39;, @CurrDt datetime=&#39;02May2011&#39;)&lt;br /&gt;
Returns int&lt;br /&gt;
as&lt;br /&gt;
begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;declare @myAge int&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;set @myAge=datediff(year,@myDob,@currdt)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return(@myage)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
select GetMyAgeInYrs(default,default) as myAge --It shows error&lt;br /&gt;
--Scalar function name must be prefixed with either DBName.DBO.myFuntion1 or DBO.myFunction1 &lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;-- DBO is the owner name of db&lt;br /&gt;
select ArunDB1.DBO.GetMyAgeInYrs(&#39;07Apr1981&#39;,getdate()) as myAge&lt;br /&gt;
select dbo.getmyageinyrs(default,default) as myAgeInYrs&lt;br /&gt;
&lt;br /&gt;
create function myNameWithAge (@myAge int=20)&lt;br /&gt;
returns nvarchar(200)&lt;br /&gt;
as&lt;br /&gt;
begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;declare @myName nvarchar(200)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;set @myName=N&#39;Arun Kakkar&#39;&#39;s age is &#39; + convert(nvarchar(200),@myage) --If we not use N we got error&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return(@myname)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
select DBO.myNameWithAge(default) as Msg&lt;br /&gt;
select ArunDB1.DBO.myNameWithAge(30) as Msg&lt;br /&gt;
&lt;br /&gt;
Alter Function myNameWithAge(@myAge int=30)&lt;br /&gt;
returns nvarchar(200)&lt;br /&gt;
as&lt;br /&gt;
Begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;declare @myName nvarchar(200)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;set @myName=N&#39;Arun Kakkar&#39;&#39;s Age is=&#39; + convert(nvarchar(200),@myAge)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return (@myName)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
select DBO.myNameWithAge(29) as Msg&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--2. Inline Table valued UDF--------------&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Go&lt;br /&gt;
if exists(select name from sysobjects where name=&#39;myGetFName&#39; and type=&#39;IF&#39;)&lt;br /&gt;
--if object_id(&#39;myGetFName&#39;,&#39;IF&#39;) is not null --working fine&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;drop function myGetFName&lt;br /&gt;
Go&lt;br /&gt;
create function myGetFName(@myFName nvarchar(200)=&#39;F%&#39;)&lt;br /&gt;
returns table&lt;br /&gt;
as&lt;br /&gt;
return(select * from myTable1 where FName like @myFName)&lt;br /&gt;
&lt;br /&gt;
--in Select Query, Inline function acts as any table&lt;br /&gt;
select * from dbo.myGetFName(default)&lt;br /&gt;
select * from dbo.myGetFName(&#39;F%1&#39;)&lt;br /&gt;
select * from mytable1 where fname like &#39;F%1&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--3. Mulit-Statement Table-Valued UDF ------------------&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Go&lt;br /&gt;
--if exists(select name from sysobjects where name=&#39;myGetFNameWithAge&#39; and type=&#39;TF&#39;)&lt;br /&gt;
if object_Id(&#39;myGetFNameWithAge&#39;,&#39;TF&#39;) is not null&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;drop function myGetFNameWithAge&lt;br /&gt;
Go&lt;br /&gt;
Create Function myGetFNameWithAge(@myAgeAfterYrs int=20)&lt;br /&gt;
returns @myTable table&lt;br /&gt;
(&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;mySNo int Identity primary key ,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FName nvarchar(200) null,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;NewAge numeric(4) null&lt;br /&gt;
)&lt;br /&gt;
as&lt;br /&gt;
Begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;insert into @myTable&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;select Fname,age from myTable1&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;update @myTable set NewAge= case&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt; when NewAge&amp;gt;=20 and newAge&amp;lt;22 then&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;       &lt;/span&gt;@myAgeAFterYrs&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;else&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;newAge&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;end&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--return (@myTable)--It gives error&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
select * from dbo.myGetFNameWithAge(default)&lt;br /&gt;
select * from dbo.myGetFNameWithAge(29)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--***** Begin ****** Triggers **************************&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Triggers&lt;br /&gt;
1.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INSTEAD OF&amp;gt;&amp;gt; INSTEAD OF triggers are executed in place of the usual triggering action. INSTEAD OF triggers can also be defined on views with one or more base tables, where they can extend the types of updates a view can support.&lt;br /&gt;
2.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AFTER &amp;gt;&amp;gt;AFTER triggers are executed after the action of the INSERT, UPDATE, or DELETE statement is performed. Specifying AFTER is the same as specifying FOR, which is the only option available in earlier versions of SQL Server. AFTER triggers can be specified only on tables.&lt;br /&gt;
&lt;br /&gt;
Function&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AFTER trigger&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INSTEAD OF trigger&lt;br /&gt;
Applicability&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Tables&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Tables and views&lt;br /&gt;
Quantity per table or view&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Multiple per triggering action (UPDATE, DELETE, and INSERT)&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;One per triggering action (UPDATE, DELETE, and INSERT)&lt;br /&gt;
Cascading references&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;No restrictions apply&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Are not allowed on tables that are targets of cascaded referential integrity constraints.&lt;br /&gt;
Execution&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;After:&lt;br /&gt;
•&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Constraint processing&lt;br /&gt;
•&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Declarative referential actions&lt;br /&gt;
•&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inserted and deleted tables creation&lt;br /&gt;
•&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;The triggering action &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Before:&lt;br /&gt;
•&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Constraint processing&lt;br /&gt;
In place of:&lt;br /&gt;
•&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;The triggering action&lt;br /&gt;
After:&lt;br /&gt;
•&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inserted and deleted tables creation&lt;br /&gt;
Order of execution&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;First and last execution may be specified&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Not applicable&lt;br /&gt;
text, ntext, and image column references in inserted and deleted tables&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Not allowed&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Allowed&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
1.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;inserted and deleted Tables&amp;gt;&amp;gt; Two special tables are used in trigger statements: the deleted table and the inserted table. Microsoft® SQL Server™ 2000 automatically creates and manages these tables. You can use these temporary, memory-resident tables to test the effects of certain data modifications and to set conditions for trigger actions; however, you cannot alter the data in the tables directly.&lt;br /&gt;
a.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;The inserted and deleted tables are used primarily in triggers to:&lt;br /&gt;
i.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Extend referential integrity between tables.&lt;br /&gt;
ii.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Insert or update data in base tables underlying a view.&lt;br /&gt;
iii.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Check for errors and take action based on the error.&lt;br /&gt;
iv.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Find the difference between the state of a table before and after a data modification and take action(s) based on that difference.&lt;br /&gt;
b.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;The deleted table stores copies of the affected rows during DELETE and UPDATE statements. During the execution of a DELETE or UPDATE statement, rows are deleted from the trigger table and transferred to the deleted table. The deleted table and the trigger table ordinarily have no rows in common.&lt;br /&gt;
c.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;The inserted table stores copies of the affected rows during INSERT and UPDATE statements. During an insert or update transaction, new rows are added simultaneously to both the inserted table and the trigger table. The rows in the inserted table are copies of the new rows in the trigger table.&lt;br /&gt;
d.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;An update transaction is similar to a delete operation followed by an insert operation; the old rows are copied to the deleted table first, and then the new rows are copied to the trigger table and to the inserted table.&lt;br /&gt;
e.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Each column in the inserted and deleted tables maps directly to a column in the base table.&lt;br /&gt;
f.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;The format of the inserted and deleted tables passed to an INSTEAD OF trigger defined on a view matches the select list of the SELECT statement defined for the view. For example:&lt;br /&gt;
i.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CREATE VIEW EmployeeNames (EmployeeID, LName, FName)&lt;br /&gt;
ii.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AS&lt;br /&gt;
iii.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT EmployeeID, LastName, FirstName&lt;br /&gt;
iv.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FROM Northwind.dbo.Employees&lt;br /&gt;
3.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Syntax of Trigger creation&lt;br /&gt;
a.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CREATE TRIGGER trigger_name&lt;br /&gt;
ON { table | view }&lt;br /&gt;
[ WITH ENCRYPTION ]&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; { { FOR | AFTER | INSTEAD OF } { [ INSERT ] [ , ] [ UPDATE ] [ , ] [ DELETE ] }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ WITH APPEND ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ NOT FOR REPLICATION ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ { IF UPDATE ( column )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ { AND | OR } UPDATE ( column ) ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ ...n ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | IF ( COLUMNS_UPDATED ( ) { bitwise_operator } updated_bitmask )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { comparison_operator } column_bitmask [ ...n ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sql_statement [ ...n ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
--------------------&lt;br /&gt;
4.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;E.g 1 Use a trigger with a reminder message&lt;br /&gt;
a.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;USE pubs&lt;br /&gt;
b.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--IF OBJECT_ID (&#39;Sales.reminder1&#39;, &#39;TR&#39;) IS NOT NULL –USED IN SQL Server 2005 onward&lt;br /&gt;
c.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;IF EXISTS (SELECT name FROM sysobjects&lt;br /&gt;
d.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WHERE name = &#39;reminder&#39; AND type = &#39;TR&#39;)&lt;br /&gt;
e.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DROP TRIGGER reminder&lt;br /&gt;
f.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
g.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CREATE TRIGGER reminder&lt;br /&gt;
h.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ON titles&lt;br /&gt;
i.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FOR INSERT, UPDATE&lt;br /&gt;
j.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AS RAISERROR (‘you are trying to do some unauthorized work’, 16, 10)&lt;br /&gt;
k.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
5.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;E.g 2 Use a trigger with a reminder e-mail message&lt;br /&gt;
a.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CREATE TRIGGER reminder&lt;br /&gt;
b.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ON titles&lt;br /&gt;
c.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FOR INSERT, UPDATE, DELETE&lt;br /&gt;
d.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AS&lt;br /&gt;
e.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;EXEC master..xp_sendmail &#39;MaryM&#39;,&lt;br /&gt;
f.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&#39;Don&#39;&#39;t forget to print a report for the distributors.&#39;&lt;br /&gt;
g.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
6.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;E.g 3 Instead of trigger with view&lt;br /&gt;
a.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CREATE TABLE BaseTable&lt;br /&gt;
b.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(PrimaryKey &amp;nbsp; &amp;nbsp; int IDENTITY(1,1)&lt;br /&gt;
c.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Color &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nvarchar(10) NOT NULL,&lt;br /&gt;
d.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Material &amp;nbsp; &amp;nbsp; &amp;nbsp; nvarchar(10) NOT NULL,&lt;br /&gt;
e.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ComputedCol AS (Color + Material)&lt;br /&gt;
f.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;)&lt;br /&gt;
g.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
&lt;br /&gt;
h.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--Create a view that contains all columns from the base table.&lt;br /&gt;
i.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CREATE VIEW InsteadView&lt;br /&gt;
j.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AS SELECT PrimaryKey, Color, Material, ComputedCol&lt;br /&gt;
k.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FROM BaseTable&lt;br /&gt;
l.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
&lt;br /&gt;
m.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--Create an INSTEAD OF INSERT trigger on the view.&lt;br /&gt;
n.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CREATE TRIGGER InsteadTrigger on InsteadView&lt;br /&gt;
o.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INSTEAD OF INSERT&lt;br /&gt;
p.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AS&lt;br /&gt;
q.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;BEGIN&lt;br /&gt;
r.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--Build an INSERT statement ignoring inserted.PrimaryKey and&lt;br /&gt;
s.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--inserted.ComputedCol.&lt;br /&gt;
t.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INSERT INTO BaseTable&lt;br /&gt;
u.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT Color, Material&lt;br /&gt;
v.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FROM inserted&lt;br /&gt;
w.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;END&lt;br /&gt;
x.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
&lt;br /&gt;
y.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--A correct INSERT statement supplying dummy values for the&lt;br /&gt;
z.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--PrimaryKey and ComputedCol columns.&lt;br /&gt;
aa.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;INSERT INTO InsteadView (PrimaryKey, Color, Material, ComputedCol)&lt;br /&gt;
bb.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;VALUES (999, N&#39;Blue&#39;, N&#39;Plastic&#39;, N&#39;XXXXXX&#39;)&lt;br /&gt;
cc.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;--View the results of the INSERT statement.&lt;br /&gt;
dd.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT PrimaryKey, Color, Material, ComputedCol&lt;br /&gt;
ee.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FROM InsteadView&lt;br /&gt;
7.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;E.g 4 used in SQL Server 2005&lt;br /&gt;
a.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;USE AdventureWorks2008R2;&lt;br /&gt;
b.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
c.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;IF OBJECT_ID (&#39;Purchasing.LowCredit&#39;,&#39;TR&#39;) IS NOT NULL&lt;br /&gt;
d.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DROP TRIGGER Purchasing.LowCredit;&lt;br /&gt;
e.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
f.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;This trigger prevents a row from being inserted in the Purchasing.PurchaseOrderHeader table&lt;br /&gt;
g.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;when the credit rating of the specified vendor is set to 5 (below average).&lt;br /&gt;
&lt;br /&gt;
h.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CREATE TRIGGER Purchasing.LowCredit ON Purchasing.PurchaseOrderHeader&lt;br /&gt;
i.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AFTER INSERT&lt;br /&gt;
j.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AS&lt;br /&gt;
k.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DECLARE @creditrating tinyint, @vendorid int;&lt;br /&gt;
l.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;IF EXISTS (SELECT *&lt;br /&gt;
m.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FROM Purchasing.PurchaseOrderHeader p&lt;br /&gt;
n.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JOIN inserted AS i&lt;br /&gt;
o.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ON p.PurchaseOrderID = i.PurchaseOrderID&lt;br /&gt;
p.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;JOIN Purchasing.Vendor AS v&lt;br /&gt;
q.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ON v.BusinessEntityID = p.VendorID&lt;br /&gt;
r.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WHERE v.CreditRating = 5&lt;br /&gt;
s.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;)&lt;br /&gt;
t.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;BEGIN&lt;br /&gt;
u.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;RAISERROR (&#39;This vendor&#39;&#39;s credit rating is too low to accept new purchase orders.&#39;, 16, 1);&lt;br /&gt;
v.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ROLLBACK TRANSACTION;&lt;br /&gt;
w.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;RETURN&lt;br /&gt;
x.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;END;&lt;br /&gt;
y.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
8.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;E.g 5 Using a database-scoped DDL trigger&lt;br /&gt;
a.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;USE AdventureWorks2008R2;&lt;br /&gt;
b.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
c.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;IF EXISTS (SELECT * FROM sys.triggers&lt;br /&gt;
d.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;WHERE parent_class = 0 AND name = &#39;safety&#39;)&lt;br /&gt;
e.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DROP TRIGGER safety&lt;br /&gt;
f.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ON DATABASE;&lt;br /&gt;
g.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
h.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CREATE TRIGGER safety&lt;br /&gt;
i.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ON DATABASE&lt;br /&gt;
j.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;FOR DROP_SYNONYM&lt;br /&gt;
k.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AS&lt;br /&gt;
l.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;RAISERROR (&#39;You must disable Trigger &quot;safety&quot; to drop synonyms!&#39;,10, 1)&lt;br /&gt;
m.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ROLLBACK&lt;br /&gt;
n.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
o.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;DROP TRIGGER safety&lt;br /&gt;
p.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ON DATABASE;&lt;br /&gt;
q.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;GO&lt;br /&gt;
9.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;e.g. 6. example of a single SQL Server trigger that handles all (3) three conditions of the trigger actions INSERT, UPDATE, and DELETE. This type of interface is sometimes needed when there is both a common configuration and a specific action to occur on an INSERT vs. UPDATE trigger. &amp;nbsp;In these cases, to create a separate trigger for the UPDATE and the INSERT would become maintenance problem.&lt;br /&gt;
a.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;CREATE TRIGGER [dbo].[INSUPDDEL_MyDataTable]&lt;br /&gt;
ON [dbo].[MyDataTable] FOR INSERT, UPDATE, DELETE&lt;br /&gt;
AS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- SET NOCOUNT ON added to prevent extra result sets from&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- interfering with caller queries SELECT statements.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- If an update/insert/delete occurs on the main table, the number of records affected&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- should only be based on that table and not what records the triggers may/may not&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- select.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SET NOCOUNT ON;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- Variables Needed for this Trigger&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DECLARE @PACKLIST_ID varchar(15)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DECLARE @LINE_NO smallint&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DECLARE @SHIPPED_QTY decimal(14,4)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DECLARE @CUST_ORDER_ID varchar(15)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- Determine if this is an INSERT,UPDATE, or DELETE Action&lt;br /&gt;
&amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DECLARE @Action as char(1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DECLARE @Count as int&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SET @Action = &#39;I&#39; -- Set Action to &#39;I&#39;nsert by default.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SELECT @Count = COUNT(*) FROM DELETED&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if @Count &amp;gt; 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET @Action = &#39;D&#39; -- Set Action to &#39;D&#39;eleted.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT @Count = COUNT(*) FROM INSERTED&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF @Count &amp;gt; 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET @Action = &#39;U&#39; -- Set Action to &#39;U&#39;pdated.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if @Action = &#39;D&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- This is a DELETE Record Action&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT @PACKLIST_ID =[PACKLIST_ID]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,@LINE_NO = [LINE_NO]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM DELETED&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DELETE [dbo].[MyDataTable]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE [PACKLIST_ID]=@PACKLIST_ID AND [LINE_NO]=@LINE_NO&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;br /&gt;
ELSE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- Table INSERTED is common to both the INSERT, UPDATE trigger&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT @PACKLIST_ID =[PACKLIST_ID]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,@LINE_NO = [LINE_NO]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,@SHIPPED_QTY =[SHIPPED_QTY]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,@CUST_ORDER_ID = [CUST_ORDER_ID]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM INSERTED&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if @Action = &#39;I&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- This is an Insert Record Action&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT INTO [MyChildTable]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (([PACKLIST_ID]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,[LINE_NO]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,[STATUS]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (@PACKLIST_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,@LINE_NO&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,&#39;New Record&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- This is an Update Record Action&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UPDATE [MyChildTable]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET [PACKLIST_ID] = @PACKLIST_ID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,[LINE_NO] = @LINE_NO&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,[STATUS]=&#39;Update Record&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE [PACKLIST_ID]=@PACKLIST_ID AND [LINE_NO]=@LINE_NO&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END &lt;br /&gt;
--***** End ****** Triggers **************************&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--*****Begin******** VIEW ********************************************************&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
--VIEW--&amp;gt;&amp;gt;Creates a virtual table whose contents (columns and rows) are defined by a query. Use this statement to create a view of the data in one or more tables in the database. For example, a view can be used for the following purposes:&lt;br /&gt;
-----------------------------------------------------------------------------&lt;br /&gt;
--To focus, simplify, and customize the perception each user has of the database.&lt;br /&gt;
--As a security mechanism by allowing users to access data through the view, without granting the users permissions to directly access the underlying base tables.&lt;br /&gt;
--To provide a backward compatible interface to emulate a table whose schema has changed.&lt;br /&gt;
CREATE VIEW [ schema_name . ] view_name [ (column [ ,...n ] ) ]&lt;br /&gt;
[ WITH &lt;view_attribute&gt; [ ,...n ] ]&amp;nbsp;&lt;/view_attribute&gt;&lt;br /&gt;
AS select_statement&lt;br /&gt;
[ WITH CHECK OPTION ] [ ; ]&lt;br /&gt;
&lt;br /&gt;
&lt;view_attribute&gt; ::=&amp;nbsp;&lt;/view_attribute&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; [ ENCRYPTION ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; [ SCHEMABINDING ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; [ VIEW_METADATA ]&lt;br /&gt;
}&lt;br /&gt;
--------------&lt;br /&gt;
--When a view is created, the name of the view is stored in the sysobjects table. Information about the columns defined in a view is added to the syscolumns table, and information about the view dependencies is added to the sysdepends table. In addition, the text of the CREATE VIEW statement is added to the syscomments table. This is similar to a stored procedure; when a view is executed for the first time, only its query tree is stored in the procedure cache. Each time a view is accessed, its execution plan is recompiled.&lt;br /&gt;
----------------------------------------&lt;br /&gt;
--E.G 1 CREATING A SIMPLE view&lt;br /&gt;
USE AdventureWorks2008R2 ;&lt;br /&gt;
GO&lt;br /&gt;
--IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS &amp;nbsp;--used in SQL Server 2000&lt;br /&gt;
-- &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE TABLE_NAME = &#39;categories&#39;)&lt;br /&gt;
IF OBJECT_ID (&#39;hiredate_view&#39;, &#39;V&#39;) IS NOT NULL&lt;br /&gt;
DROP VIEW hiredate_view ;&lt;br /&gt;
GO&lt;br /&gt;
CREATE VIEW hiredate_view&lt;br /&gt;
AS&lt;br /&gt;
SELECT p.FirstName, p.LastName, e.BusinessEntityID, e.HireDate&lt;br /&gt;
FROM HumanResources.Employee e&lt;br /&gt;
JOIN Person.Person AS p ON e.BusinessEntityID = p.BusinessEntityID ;&lt;br /&gt;
GO&lt;br /&gt;
------------------------------&lt;br /&gt;
--E.G 2 Using built-in functions within a view&lt;br /&gt;
USE AdventureWorks2008R2 ;&lt;br /&gt;
GO&lt;br /&gt;
IF OBJECT_ID (&#39;Sales.SalesPersonPerform&#39;, &#39;V&#39;) IS NOT NULL&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DROP VIEW Sales.SalesPersonPerform ;&lt;br /&gt;
GO&lt;br /&gt;
CREATE VIEW Sales.SalesPersonPerform&lt;br /&gt;
AS&lt;br /&gt;
SELECT TOP (100) SalesPersonID, SUM(TotalDue) AS TotalSales&lt;br /&gt;
FROM Sales.SalesOrderHeader&lt;br /&gt;
WHERE OrderDate &amp;gt; CONVERT(DATETIME,&#39;20001231&#39;,101)&lt;br /&gt;
GROUP BY SalesPersonID;&lt;br /&gt;
GO&lt;br /&gt;
---------------------------&lt;br /&gt;
--E.G. 3 &amp;nbsp;Use @@ROWCOUNT function in a view&lt;br /&gt;
--This example uses the @@ROWCOUNT function as part of the view definition.&lt;br /&gt;
USE pubs&lt;br /&gt;
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE TABLE_NAME = &#39;myview&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp;DROP VIEW myview&lt;br /&gt;
GO&lt;br /&gt;
CREATE VIEW myview&lt;br /&gt;
AS&lt;br /&gt;
&amp;nbsp; &amp;nbsp;SELECT au_lname, au_fname, @@ROWCOUNT AS bar&lt;br /&gt;
&amp;nbsp; &amp;nbsp;FROM authors&lt;br /&gt;
&amp;nbsp; &amp;nbsp;WHERE state = &#39;UT&#39;&lt;br /&gt;
GO&lt;br /&gt;
SELECT * FROM myview&lt;br /&gt;
---------------------------------------------&lt;br /&gt;
--***** END ******** VIEW ********************************************************&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;--**************** Introduction to Transaction Logs &amp;nbsp;***********************************&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
--Every SQL Server 2005 database has a transaction log that records all transactions and the database modifications made by each transaction. The transaction log is a critical component of the database and, if there is a system failure, the transaction log might be required to bring your database back to a consistent state. The transaction log should never be deleted or moved unless you fully understand the ramifications of doing this.&lt;br /&gt;
--The transaction log supports the following operations:&lt;br /&gt;
-------Recovery of individual transactions.&lt;br /&gt;
-------Recovery of all incomplete transactions when SQL Server is started.&lt;br /&gt;
-------Rolling a restored database, file, filegroup, or page forward to the point of failure.&lt;br /&gt;
-------Supporting transactional replication.&lt;br /&gt;
-------Supporting standby-server solutions.&lt;br /&gt;
--------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
select * from myTable1&lt;br /&gt;
--Inserted&amp;gt;&amp;gt;Insert, Update&lt;br /&gt;
--Deleted&amp;gt;&amp;gt; Delete, Update&lt;br /&gt;
Go&lt;br /&gt;
--If exists(select Name from sysobjects where name=&#39;myTable1_AfterInsertTrig&#39; and type=&#39;TR&#39;)&lt;br /&gt;
if object_Id(&#39;myTable1_AfterInsertTrig&#39;,&#39;TR&#39;) is not null&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;drop trigger myTable1_AfterInsertTrig&lt;br /&gt;
Go&lt;br /&gt;
Create Trigger myTable1_AfterInsertTrig&lt;br /&gt;
on myTable1&lt;br /&gt;
After Insert&lt;br /&gt;
as&lt;br /&gt;
Begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Declare @FName nvarchar(200)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Declare @LName nvarchar(200)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Select @FName=FName, @LName=LName from Inserted&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Set @FName=@FName + &#39;_InsertTrigger&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;insert into myTable1(Fname,Lname) values(@FName,@Lname)&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
insert into myTable1(FName,LName,age) values(&#39;Ram&#39;,&#39;Ram&#39;,30)&lt;br /&gt;
select * from myTable1&lt;br /&gt;
&lt;br /&gt;
Go&lt;br /&gt;
if object_id(&#39;myTable1_InsteadOfDelTrig&#39;,&#39;TR&#39;) is not null&lt;br /&gt;
--if exists(select name from sysobjects where name=&#39;myTable1_InsteadOfDelTrig&#39; and type=&#39;TR&#39;)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;drop trigger myTable1_InsteadOfDelTrig&lt;br /&gt;
Go&lt;br /&gt;
Create Trigger myTable1_InsteadOfDelTrig&lt;br /&gt;
on myTable1&lt;br /&gt;
Instead of Delete&lt;br /&gt;
as&lt;br /&gt;
Begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Declare @myFName nvarchar(200)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Declare @myLName nvarchar(200)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;select @myFName=Fname,@myLName=LName from Deleted&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;set @myFName=@myFName + &#39;_InsteadOfDelTrigger&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Insert into myTable1(FName,LName) values (@myFName,@myLName)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
delete from myTable1 where myId=2&lt;br /&gt;
select * from myTable1&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;-- View ------------------&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Go&lt;br /&gt;
If exists(select name from sysobjects where name=&#39;myTable1_View&#39; and type=&#39;V&#39;)&lt;br /&gt;
--if object_id(&#39;myTable1_View&#39;,&#39;V&#39;) is not null&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;drop view myTable1_View&lt;br /&gt;
Go&lt;br /&gt;
create view myTable1_View&lt;br /&gt;
As&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;select Fname,age from myTable1&lt;br /&gt;
---------------&lt;br /&gt;
select * from myTable1_View&lt;br /&gt;
insert into myTable1_View values(&#39;Ram_View&#39;,30)&lt;br /&gt;
select * from myTable1&lt;br /&gt;
--triggeres set for base table also work on views&lt;br /&gt;
--insert stmnt apply on view also apply on base table&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;-------** Begin ************* &amp;nbsp;Try Catch ****************************&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
-- Note: &amp;nbsp;Try catch mentioned below work in SQL Server 2005&lt;br /&gt;
Go&lt;br /&gt;
if exists(select name from sysobjects where name=&#39;mySP_ErrorHandler&#39; and type=&#39;P&#39;)&lt;br /&gt;
--if object_Id(&#39;mySP_ErrorHandler&#39;,&#39;P&#39;) is not null&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Drop proc mySP_ErrorHandler&lt;br /&gt;
Go&lt;br /&gt;
create proc mySP_ErrorHandler&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@myNumerator int=1, @myDenominator int=0&lt;br /&gt;
As&lt;br /&gt;
Begin&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin try&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;--print @myNumerator/@myDenominator&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;select @myNumerator/@myDenominator as myDivisionResult&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End try&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Catch&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;select Error_Number() as ErrorNumber,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp; Error_Severity() as ErrorSeverity,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp; Error_State() as ErrorState,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp; Error_Procedure() as ErrorProcedure,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp; Error_Line() as ErrorLine,&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt; &amp;nbsp; Error_Message() as ErrorMessage&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Catch&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
exec mySP_ErrorHandler&lt;br /&gt;
exec mySP_ErrorHandler 5,2&lt;br /&gt;
exec mySP_ErrorHandler 5,0&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Due to lack of time &amp;amp; of course some laziness, I would not able to complete this post in proper manner.&lt;br /&gt;
But as soon as I got&amp;nbsp;opportunity, I would update this post as I think it would be very necessary to update this post to make it more understandable, readable etc.&lt;br /&gt;
&lt;br /&gt;
Wish you a very Happy Programming.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/1491154306273502974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2011/08/quickly-revise-plsql-used-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/1491154306273502974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/1491154306273502974'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2011/08/quickly-revise-plsql-used-in-sql-server.html' title='Quickly Revise PL/SQL used in SQL Server 2000/2005/2008'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-5959163295958063085</id><published>2011-07-12T01:47:00.000-07:00</published><updated>2011-07-20T23:08:43.784-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="OOPs concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="OOPs Concepts in C#.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Quickly revise OOPs concepts in C#.NET"/><title type='text'>How to Revise Basic OOPs concepts in C Sharp.Net (Summary only)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;u&gt;RAM RAM Friends&lt;/u&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
How to Revise Basic OOPs concepts in C Sharp.Net (only syntax and concepts but very less or no description) ) like (types of Constructors,Inheritance,Polymorphism,Abstract Class,Interface,Delegate,Events,Sealed Classes,Overriding, etc)&lt;br /&gt;
&lt;br /&gt;
Here I try to explain different OOPs concepts in C#.NET using examples only with very less description as it is only for revision purpose (both syntax &amp;amp; concept).&lt;br /&gt;
&lt;br /&gt;
Below I have shown my sample console program to use different OOPs concepts&lt;br /&gt;
&lt;br /&gt;
*********ArunKakkarConsoleApp1************************&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Text;&lt;br /&gt;
&lt;br /&gt;
using System.Text.RegularExpressions;&lt;br /&gt;
&lt;br /&gt;
//Using Events Method 1 (a) --&amp;gt;&amp;gt;by Inheriting ArrayList&lt;br /&gt;
//below namespace is used form Event learning in c#.Net&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;namespace myListNamespace&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; using System.Collections;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //step 1. delegate type for hooking up change (event) &amp;nbsp;notification&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public delegate void myDelChangedEventHandler(object sender,EventArgs e);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; public class myListClass : ArrayList&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //step 2. declare event that clients can be used to notified&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //--------whenever the event raised (here elements of list change)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public event myDelChangedEventHandler myEventChanged;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //step 3. Raise Event (here whenever elements of list changes)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected virtual void myEventRaisedOnChanged(EventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (myEventChanged != null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myEventChanged(this, e); &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //step 4. create such methods etc which may raise the event&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //below are methods(add,clear,this) which r override as they may change the list&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;amp; in each method event is invoked&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public override int Add(object value)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int i= base.Add(value);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myEventRaisedOnChanged(EventArgs.Empty);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public override void Clear()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; base.Clear();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myEventRaisedOnChanged(EventArgs.Empty);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public override object this[int index]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return base[index];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; base[index] = value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myEventRaisedOnChanged(EventArgs.Empty);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;namespace ArunKakkarConsoleApp1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //below namespace is used to learn Events in C#.Net&lt;br /&gt;
&amp;nbsp; &amp;nbsp; using myListNamespace;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Different Types of Constructor&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class InstanceConstructor&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private int x, y;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public InstanceConstructor()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; y = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;in Parameterless contructor,x={0}, y={1}&quot;, x, y);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public InstanceConstructor(int i)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x = i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; y = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;In single parameter constructor, x={0}, y={1}&quot;, x, y);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public InstanceConstructor(int i, int j)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.x = i;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.y = j;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;In double parameter constructor, x={0}, y={1}&quot;, x, y);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ~InstanceConstructor()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;Destructor of class InstanceConstructor is called&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myDefaultConstructorClass&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private int _x;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private string _s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public int x&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return _x;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _x = value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string s&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return _s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _s = value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myShow()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //if (_x==null )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp;Console.WriteLine(&quot;X is null&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //if(_x != null )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;x is not null ,x={0}&quot;,_x); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myPrivateConstructor&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public const double pi = 3.14;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private myPrivateConstructor()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myStaticConstructorClass&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Static constructor :&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Static Constructors are used to instantiate static data fields in the class. Static Constructors are called only once no matter how many instances you create for that class.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Static Constructors are executed before any other type of constructor. Static Constructors cannot be called explicitly. They are automatically invoked when&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //An instance of the class is created&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Any of the static members of the class are referenced&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //It is a compile time error to have access modifiers for static constructors.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public int j;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static int i;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public myStaticConstructorClass()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; j = 25;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\n Normal Instance constructor of myStaticConstructorClass is invoked&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static myStaticConstructorClass()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i = 20;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\n static constructor of myStaticConstructorClass is invoked&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Static Class&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public static class myStaticClass1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static int myVal;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //we can declare only static constructor in a static class&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //public myStaticClass1()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //we can not use public etc modifire on the static class constructor&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //public static myStaticClass1()&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //not mandatory to declare constructor for a static class i.e. we can use class without any constructor&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static myStaticClass1()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myVal = 30;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static void myShow()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\n Hello it is myShow() method of myStaticClass1&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //we can declare only static members in a static class&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //public void myShow2()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //{ &amp;nbsp;Console.WriteLine(&quot;\nHello it is myShow2() method of myStaticClass1&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Polymorphism &amp;amp; Inheritance (Virtual-&amp;gt;Override, &amp;nbsp;Virtual-&amp;gt;Override-&amp;gt;Sealed, on creating instance of child class,sequence of constructor invoked 1. GrandParent 2.Parent 3.Child)&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp; &amp;nbsp; public class myParent&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private string s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //protected myParent()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public myParent()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s=@&quot;This is a string from parent class have both \ and &amp;amp; signs&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is myParent class constructor&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string ParseBackSlash()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s1=s;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s1=s1.Replace(&quot;\\&quot;,string.Empty);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return s1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public virtual void ShowMsg()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is showmsg from myParent class&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public virtual void myShowMsg5()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;this is myShowMsg5 method of myParent class&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myChild1 : myParent&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string ParseAmpersand()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s2 = base.ParseBackSlash();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s2 = s2.Replace(&quot;&amp;amp;&quot;, string.Empty);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return s2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public override void ShowMsg()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is showmsg from myChild1 class&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public sealed override void myShowMsg5()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//base.myShowMsg5();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is override sealed method myShowMsg5 which is originally of myParent class&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myChild2 : myParent&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public myChild2()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is myChild2 class constructor&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public override void ShowMsg()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//base.ShowMsg();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;this is ShowMsg method of myChild2 class&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myShowAns()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is myShowAns method of myChild2 class&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; public class myGrandChild1 : myChild2&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public myGrandChild1()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is constructor of myGrandChild1 class, its parent class is myChild2, its grandParentClass is myParent&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Interface handling&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public interface myInterface_1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //i/f can&#39;t contain fields&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //protected int x;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string id&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void myShowResult();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //if we declare this here &amp;amp; do not implement it &amp;amp; use i/f then show compile time error&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //void myWish(); &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; interface myInterface_2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void myShowResult();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myClassUsingInterface1 :myInterface_1&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected string &amp;nbsp;x;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string id&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return x;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x = value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public myClassUsingInterface1()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;this is constructor of myClassUsingInterface1&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myShowResult()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is myshowResult of myInterface_1 implement by myClassUsingInterface1&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myClassUsingInterface2 : myInterface_1, myInterface_2&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string &amp;nbsp;x;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string id&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return x;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; x = value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myShowResult()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is myShowResult method which is common in both myInterface_1 &amp;amp; myInterface_2 implement by myClassUsingInterface2&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Explicitly members of interfaces&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myClassUsingInterface3 : myInterface_1, myInterface_2&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string y;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string id&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return y;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; y = value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Explicitly members of interfaces&amp;gt;&amp;gt;&amp;gt;&amp;gt; we can&#39;t use public etc keywords&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void myInterface_1.myShowResult()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is myInterface_1.myShowResult() method called&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void myInterface_2.myShowResult()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is myInterface_2.myShowResult() method called&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Abstract Class&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public abstract class myAbstractClass&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myShowMessage()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;my showmsg method of myAbstractClass class&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public abstract &amp;nbsp;void myShowMessage2();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myChild3 : myAbstractClass&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myShowMessage3()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; base.myShowMessage();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is myShowMessage3 method of myChild3 class&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public override void myShowMessage2()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //base.myShowMessage2();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This is from myShowMessage2 override by myChild3 class&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Sealed Classes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public sealed class myChild4 : myChild3&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public int myAddNumbers(int x, int y)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return x + y;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myShowMsg4()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;this is myShowMsg4 from sealed class myChild4&quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myShowMsg5(int i)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;myShowMsg5 called with i=&quot; + i);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myShowMsg6(int j)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;myShowMsg6 called with j={0}&quot;, j);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //5. Delegates &amp;nbsp;&amp;amp; events&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //(publisher [who declare/create event &amp;amp; told all subscriber that a particular event is raised]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //&amp;amp; subsriber(who write code for event handler))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Using Events Method 1 (b) --&amp;gt;&amp;gt;by Inheriting ArrayList&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myEventListner&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //step 5. class that listen the events raised by event class&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private myListClass myList;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //step 6. create method that acts as event handler&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //called whenever list changes&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private void myListChanged(object sender, EventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;myListChanged method is called when event(change in list) fired&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public myEventListner(myListClass myL1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myList = myL1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //step 7. add events&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myList.myEventChanged += new myDelChangedEventHandler(myListChanged);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myDetach()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //step 8. Detach the event &amp;amp; delete the list&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myList.myEventChanged -= new myDelChangedEventHandler(myListChanged);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myList = null;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Using Events Method 2 --&amp;gt;&amp;gt; Events as Publisher &amp;amp; Subscriber&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myPublisher &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //using System.Windows.Forms&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public delegate void myDelegate2(object from, EventArgs args);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public event &amp;nbsp;myDelegate2 &amp;nbsp;myEvent;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myRaiseMyEvent(EventArgs args)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myEvent(this, args);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void SendTheEvent()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;The event is fired here in SendTheEvent method of publisher class&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.myRaiseMyEvent(new EventArgs()); &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class mySubscriber&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private void myHandleMyEvent(object sender, EventArgs args)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;myEvent is handled in the myHandleMyEvent of the mySubscriber class&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;who is the sender ? &quot; + sender.GetType());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public mySubscriber()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myPublisher p1 = new myPublisher();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p1.myEvent += new myPublisher.myDelegate2(myHandleMyEvent);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p1.SendTheEvent();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //Using Events Method 3 ---&amp;gt;&amp;gt; Event using built-in event delegate &quot;EventHandler&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myEventPublisherWithDefaultDelegate&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //For events that do not use any additional information, the .NET Framework has already defined an&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //appropriate delegate type: EventHandler.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //If we not use EventHandler keyword, we need to define a Delegate(say myEvent2Delegate) eqvivalent to EventHanler&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private string _myVal;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public event EventHandler myEvent2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myEvent2Raiser(EventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myEvent2(this, e);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string myVal&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return _myVal;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _myVal = value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.myEvent2Raiser(new EventArgs());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;public class myEventSubscriberWithDefaultDelegate&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void myEvent2Handler(object sender, EventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\nThis is myEvent2Handler called since Event myEvent2 is raised&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\n It is called by = &quot; + this.GetType());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public myEventSubscriberWithDefaultDelegate()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myEventPublisherWithDefaultDelegate p1 = new myEventPublisherWithDefaultDelegate();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p1.myEvent2 +=new EventHandler(this.myEvent2Handler);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p1.myVal =&quot;ram Ram&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p1.myVal +=&quot; Hare Ram&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;class Program&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Delegate Handling ( Single Cast, &amp;nbsp;MultiCast )&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public delegate int myDel(int a, int b);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public delegate void myDel2();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public delegate void myMultiCastDel(int m);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;static void Main(string[] args)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //------------------------ Topics ---------------------------------------------------------------&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //OOPS CONCEPTS&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //1. Types of Constructor (a. Default, b. Instance, c. Private, d. Static) &amp;amp; Destructor&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //2. Types of Classes&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //a. Static,&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //b. Abstract {(abstract &amp;amp; override) &amp;amp; abstract methods},&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //c. Sealed &amp;nbsp;(can not be inherited) &amp;amp; sealed override methods&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //complete syntax of a class with all options explained&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //3. Inheritance (Virtual &amp;amp; override), properties, static variables, private,protected,public variables etc&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //4. Polymorphism, Early/Static/CompileTime Binding &amp;amp; Late/Dynamic/Runtime Binding&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //5. Interface &amp;amp; Explicitly declaration&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //6. Delegate (Signle Cast &amp;amp; MultiCast)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //7. Events&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //------------------------------- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //8. Regular Expression&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //9. Number To Words&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //10.Webservice&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //-------------------------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt; //1(a). Type of Constructors--&amp;gt;Instance Constructor&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; InstanceConstructor ic1 = new InstanceConstructor();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; InstanceConstructor ic2 = new InstanceConstructor(3);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; InstanceConstructor ic3 = new InstanceConstructor(4,5);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #e69138;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//Destructor&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ic1 = null;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GC.Collect(); //Call Garbage collector&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt; //1(b). Type of Constructors--&amp;gt;Default Constructor&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myDefaultConstructorClass dc1 = new myDefaultConstructorClass();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot; before giving values, x={0},s={0}&quot;, dc1.x, dc1.s);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc1.myShow();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc1.x = 25;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc1.s = &quot;Arun Kakkar&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;After giving values, x={0},s={1}&quot;, dc1.x, dc1.s);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dc1.myShow();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//1(c). Type of Constructors--&amp;gt;Private constructor&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;private class value, x=&quot; + myPrivateConstructor.pi);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//1(d). Type of Constructors--&amp;gt;Static Constructor&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;mystaticConstructorClass class value, x={0}&quot;, myStaticConstructorClass.i);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myStaticConstructorClass scs1=new myStaticConstructorClass();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\n j={0} and i={1} in myStaticConstructorClass &quot;,scs1.j ,myStaticConstructorClass.i);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//2(a). Types of Classes---&amp;gt; Static Class &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myStaticClass1.myShow();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\n MyVal of myStaticClass1 is=&quot; + myStaticClass1.myVal);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myStaticClass1.myVal = 23;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\n MyVal after updation of myStaticClass1 is=&quot; + myStaticClass1.myVal);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;//2(b). Types of Classes---&amp;gt; Abstract class&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChild3 ch3 = new myChild3();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //string s1 = &quot;below&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //s1 = &quot;ch3.myShowMessage=&quot; + ch3.myShowMessage() + &quot;\n&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //s1 += &quot;ch3.myShowMessage2=&quot; + ch3.myShowMessage2() + &quot;\n&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //s1 += &quot;ch3.myShowMessage3=&quot; + ch3.myShowMessage3();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;various functions called by myChild3 class of parent abstract class are as below \n&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ch3.myShowMessage();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ch3.myShowMessage2();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ch3.myShowMessage3();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //2(c). Types of Classes---&amp;gt; Sealed classes&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //(can not be inherited)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //A sealed class can not be used as &quot;base class&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //A sealed class can not be an abstract class.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //sealing a class means one(class) can not be driven(drived) from it&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // In C# structs are implicitly sealed.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //In C# methods can&#39;t be declared as sealed but when we override a method(in derived class),&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //we can declared the overriden method as sealed thus we cannot override this method further&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //public virtual void m1(); &amp;nbsp;in any parent class&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //public override sealed void m1() in the child class&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChild4 ch4 = new myChild4();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ch4.myShowMsg4();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//override Sealed method&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChild1 ch1 = new myChild1();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ch1.myShowMsg5();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt; //3. Inheritance (Virtual &amp;amp; override), properties, static variables, private,protected,public variables etc ***************&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //1. when we create child class instance, then first parent class constructor is called then child class constructor is called&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp; &amp;nbsp;&amp;amp; they (Constructors) are called in order from top to down sequentially.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //2. &quot;this&quot; keyword show all methods,etc of both current class &amp;amp; all its parent class &amp;gt;&amp;gt;&amp;gt;this.myShowMsg()&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // but &quot;base&quot; keyowrd show methods of only parent class &amp;gt;&amp;gt;&amp;gt;base.myShowMsg()&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //3. if u don&#39;t give any modifiers to constructor,variables they are &quot;private&quot; by default&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //4. if both current class &amp;amp; parent class have same name funtion without using &quot;virtual&quot; keyword in the parent, we get compile time error&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChild1 c1 = new myChild1();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c1.ShowMsg();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;the parsed string is=&quot; + c1.ParseAmpersand());&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChild2 c2 = new myChild2();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c2.myShowAns();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myGrandChild1 mgc1 = new myGrandChild1();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mgc1.myShowAns();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mgc1.ShowMsg();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //4. Polymorphism, Early/Static/CompileTime Binding &amp;amp; Late/Dynamic/Runtime Binding&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Polymorphism=&amp;gt;Through inheritance, a class can be used as more than one type;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // it can be used as its own type, any base type, or any interface type if it&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //implements interface. This is called Polymorphism.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myParent myP1 = new myParent();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChild1 myCh1 = new myChild1();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myChild2 myCh2 = new myChild2();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//Early/Static/CompileTime binding&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\n Below are Early Binding ShowMsg calls from myparent,child1,child2 classes&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myP1.ShowMsg();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myCh1.ShowMsg();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myCh2.ShowMsg();&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//Late/Dynamic/Runtime binding&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myParent[] myP2 = new myParent[3];&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myP2[0] = new myParent();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myP2[1] = new myChild1();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myP2[2] = new myChild2();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\n Below are Late Binding ShowMsg calls from myparent,child1,child2 classes&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt;= 2; i++)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myP2[i].ShowMsg();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //below can be used instead of above loop&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //myP2[0].ShowMsg();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //myP2[1].ShowMsg();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //myP2[2].ShowMsg();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//5. Interface &amp;amp; Explicitly declaration&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //1. all methods of i/f must be implement by class implement i/f else get compile time error&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //2. inside i/f&amp;gt;&amp;gt; &amp;nbsp;void myShowMsg(); is enough i.e. no need to be public etc&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myClassUsingInterface1 cui1 = new myClassUsingInterface1();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cui1.myShowResult();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cui1.id = &quot;ram ram&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;Value of cui1.id=&quot; + cui1.id);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myClassUsingInterface2 cui2 = new myClassUsingInterface2();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cui2.myShowResult();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;&amp;nbsp; &amp;nbsp; //Explicitly members of interfaces&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myClassUsingInterface3 myif3 = new myClassUsingInterface3();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myif3.id = &quot;ram ram ji from myIf3&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;calling myif3.id=&quot; + myif3.id);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myInterface_1 myinterface1 = (myInterface_1)myif3;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myInterface_2 myinterface2 = (myInterface_2)myif3;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myinterface1.myShowResult();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myinterface2.myShowResult();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;calling myinterface1.id={0}&quot;, myinterface1.id);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//6. Delegate (Signle Cast &amp;amp; MultiCast)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //delegate are derived from System.Delegate&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //below line declared above the void main method&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //public delegate int myDel(int a, int b);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myDel d1=new myDel(ch4.myAddNumbers);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;addition of 20 &amp;amp; 30 using delegates is=&quot; + d1(20, 30));&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; //SingleCast delegate&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myDel2 d2 = new myDel2(ch4.myShowMessage);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;void method using delegate is=\n&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d2();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;//MultiCast Delegate&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //call more than one kind of method in sequence but problem is only same value of parameter is passed in all methods&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;Below line show multicast delegate result\n&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myMultiCastDel d3 = new myMultiCastDel(ch4.myShowMsg5);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d3 += new myMultiCastDel(ch4.myShowMsg6);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d3(3);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//7(a). Events &amp;nbsp;---&amp;gt;Method 1&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Event handling using UserDefined EventDelegate&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\nBelow line show delegate and events combination result&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mySubscriber sub1 = new mySubscriber();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;//7(b). Events &amp;nbsp;---&amp;gt;Method 2&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Event Handling using Default (DotNet framework provided EventDelegate named &#39;EventHandler&#39;)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\nBelow line shows event handling with default in-built EventDelegate named &#39;EventHandler&#39;&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myEventSubscriberWithDefaultDelegate mySub1 = new myEventSubscriberWithDefaultDelegate();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;//7(c). Events &amp;nbsp;---&amp;gt;Method 3&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //create new list to test Events in C#.Net&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myListClass myL = new myListClass();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //create class that listen event (whenver list item changed) of list&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myEventListner myE = new myEventListner(myL);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Add &amp;amp; remove items from the list&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\nThis line before any event is fired in list class&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myL.Add(&quot;item 1&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\nThis line after adding item 1 in list class&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myL.Add(&quot;item 2&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\nThis line after adding item 2 in list class&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myL.Clear();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This line after clearing all items in list class&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myE.myDetach();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;This line after detaching event from the myEventLister class&quot;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//8. Regular Expression&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;Please enter any alphanumeric word only it can include underscore(_) also=&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string s = Console.ReadLine();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string r = @&quot;^[\w]+$&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (Regex.IsMatch(s, r))&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;You have entered an alphanumeric word=&quot; + s);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;Its a wrong word please enter only Alphanumeric word&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine(); &amp;nbsp; // just like getch() in C++&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;//10.Webservice calling --Webservice1 &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; localhostAK.ArunKakkarwsCustomers myWS = new localhostAK.ArunKakkarwsCustomers();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;customer name from WebService localhostAK.ArunKakkarwsCustomers is {0}&quot;, myWS.GetCustomerName(2));&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt; //webservice 2&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AKWebService_1.ArunKakkarWebServices akws1 = new AKWebService_1.ArunKakkarWebServices();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;Addition of {0} and {1} from WebService AKWebService_1.ArunKakkarWebServices is {2}&quot;,5,9, akws1.Add2IntNo(5,9));&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;//globalweather_NetWS &amp;nbsp; webservice 3 download from net with link http://www.webservicex.com/globalweather.asmx?WSDL&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string myCountry;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GlobalWeather_NetWS.GlobalWeather gw = new GlobalWeather_NetWS.GlobalWeather();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\nEnter country name to get list of its all cities&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myCountry = Console.ReadLine();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //it return a dataset in xml format&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&quot;\n Various cities in {0} are {1}&quot;, myCountry, gw.GetCitiesByCountry(myCountry));&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.ReadLine();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I hope, it would help those who want to just quickly revise OOPs concepts (both syntax &amp;amp; use).&lt;/div&gt;&lt;div&gt;Due to lack of time, I did not provide, description of various terms.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Wish you best of luck for good programming.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/5959163295958063085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2011/07/how-to-revise-basic-oops-concepts-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/5959163295958063085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/5959163295958063085'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2011/07/how-to-revise-basic-oops-concepts-in-c.html' title='How to Revise Basic OOPs concepts in C Sharp.Net (Summary only)'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-2788610558874289984</id><published>2011-04-25T05:08:00.000-07:00</published><updated>2011-04-26T01:41:18.126-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Convert number into words in C sharp.Net"/><category scheme="http://www.blogger.com/atom/ns#" term="How to convert number into words"/><title type='text'>How to convert number into words in C Sharp.Net</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;Ram Ram Friends&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
Well there are many different great algos (easy &amp;amp; small) to achieve this.&lt;br /&gt;
Below is the one of them.&lt;br /&gt;
&lt;br /&gt;
Following is the sample code in C#.Net to convert number into words&lt;br /&gt;
Since, I am Indian, so as per Indian requirement, I made this program to suit our basic needs,&lt;br /&gt;
But as this algo is very clear &amp;amp; easy to understand, you can convert it very easily by making very few changes&amp;nbsp;to suit your culture/needs.&lt;br /&gt;
This algo basically more focus on using strings (very less Mathematical&amp;nbsp;formulas/tricks) to achieve the goal, this make it more simpler &amp;amp; easy to convert it into any programming language.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;using System;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;namespace ArunKakkarConsoleApp1&lt;/li&gt;
&lt;li&gt;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public class&amp;nbsp;AK_NumberToWords&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public string GetDigitInWords(int i)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;lt; 1)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &quot;&quot;;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//&quot;zero&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string s=&quot;&quot;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i.ToString().Length &amp;gt; 2)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i = Convert.ToInt32(i.ToString().Substring(i.ToString().Length - 2, 2));&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;string[] s1 = new string[] { &quot;&quot;, &quot;one&quot;, &quot;two&quot;, &quot;three&quot;, &quot;four&quot;, &quot;five&quot;, &quot;six&quot;, &quot;seven&quot;, &quot;eight&quot;, &quot;nine&quot;, &quot;ten&quot;, &quot;eleven&quot;, &quot;twelve&quot;, &quot;thirteen&quot;, &quot;fourteen&quot;, &quot;fifteen&quot;, &quot;sixteen&quot;, &quot;seventeen&quot;, &quot;eighteen&quot;, &quot;nineteen&quot; };&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string[] s2 = new string[] { &quot;&quot;,&quot;&quot;, &quot;twenty&quot;, &quot;thirty&quot;, &quot;forty&quot;, &quot;fifty&quot;, &quot;sixty&quot;, &quot;seventy&quot;, &quot;eighty&quot;, &quot;ninety&quot; };&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string s3, s4;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;lt; 20)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = s1[i];&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s3 = i.ToString().Substring(0, 1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = s2[Convert.ToInt32(s3)];&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s4 = i.ToString().Substring(1, 1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = s + &quot; &quot; + s1[Convert.ToInt32(s4)]; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;/*switch (i) &amp;nbsp; //you can use this switch statement if u don&#39;t like to use array&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 1:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;one&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 2:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;two&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 3:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;three&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 4:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;four&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 5:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;five&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 6:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;six&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 7:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;seven&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 8:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;eight&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 9:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;nine&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 10:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;ten&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 11:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;eleven&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 12:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;twelve&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 13:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;thirteen&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 14:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;fourteen&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 15:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;fifteen&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 16:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;sixteen&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 17:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;seventeen&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 18:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;eighteen&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 19:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;nineteen&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;default:&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string s2;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s2 = i.ToString().Substring(0, 1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;switch (Convert.ToInt32(s2))&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 2:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;twenty&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 3:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;thirty&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 4:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;fourty&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 5:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;fifty&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 6:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;sixty&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 7:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;seventy&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 8:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;eighty&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case 9:&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = &quot;ninety&quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s2 = i.ToString().Substring(1, 1);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = s &amp;nbsp;+ &quot; &quot; + this.GetDigitInWords(Convert.ToInt32(s2));&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #a64d79;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}*/&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return s;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public string GetNoInWords(double d)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string s=&quot;&quot;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//19,23,45,67,89,12,34,56,789.87&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Rs &amp;nbsp;....., 67 Kharab,89 Arab,12 crore, 34 lacs, 56 thousands,7 hundred, 89 and 87 paise only&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//67,89,12,34,56,789.87&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Rs 67 Kharab,89 Arab,12 crore, 34 lacsh, 56 thousands,7 hundred, 89 and 87 paise only&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string sPaise,sTens, sHundred, sThousand, sLacs, sCrore, sArab, sKharab, sLong;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int i;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sLong = ((long)d).ToString();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (sLong.Length &amp;gt; 13)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;//s = &quot;Out of range value and maximum value is= &quot;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sLong = sLong.Substring(sLong.Length - 13, 13);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(sLong.Length &amp;lt;13)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sLong =sLong.PadLeft(13,&#39;0&#39;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt; &amp;nbsp;//Console.WriteLine(&quot;\nslong=&quot; + sLong);&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sKharab = sLong.Substring(0, 2); &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//Kharab&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sArab = sLong.Substring(2, 2); &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//arab&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sCrore = sLong.Substring(4, 2); &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//Crore&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sLacs = sLong.Substring(6, 2); &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//Lacs&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sThousand = sLong.Substring(8, 2);&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt; //thousands&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sHundred = sLong.Substring(10, 1); &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//Hundred&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sTens = sLong.Substring(11, 2);&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt; //Tens&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (d.ToString().Contains(&quot;.&quot;))&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sPaise = d.ToString().Substring(d.ToString().IndexOf(&#39;.&#39;)+1);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sPaise = &quot;0&quot;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (sPaise.Length&amp;gt;2)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sPaise = sPaise.Substring(0, 2);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i = Convert.ToInt16(sKharab);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = this.GetDigitInWords(i) + ((i&amp;gt;1)? &quot; Kharabs &quot; : &quot; Kharab &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i = Convert.ToInt16(sArab);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWords(i) + ((i&amp;gt;1)?&quot; Arabs &quot; : &quot; Arab &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i = Convert.ToInt16(sCrore);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWords(i) + ((i&amp;gt;1)?&quot; Crores &quot; : &quot; Crore &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i = Convert.ToInt16(sLacs);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWords(i) + ((i&amp;gt;1)? &quot; Lacs &quot;: &quot; Lac &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i = Convert.ToInt16(sThousand);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWords(i) + ((i&amp;gt;1)? &quot; Thousands &quot; : &quot; Thousand &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i = Convert.ToInt16(sHundred);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWords(i) +((i&amp;gt;1)? &amp;nbsp;&quot; Hundreds &quot;: &quot; Hundred &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i=Convert.ToInt16(sTens);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWords(i) + &quot; &quot;;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i = Convert.ToInt16(sPaise);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += &quot; and &quot; + this.GetDigitInWords(i) + ((i&amp;gt;0)? &quot; Paises &quot;: &quot; Paise &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += &quot;only&quot;;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return s;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//public string GetNoInWords(double d)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: large;&quot;&gt;&lt;b&gt;//Below is using Math logic&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: large;&quot;&gt;&lt;b&gt;//I tried to give example at almost each step to understand logic&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public String GetDigitInWordsByMath(int i)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string s=&quot;&quot;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int j, k;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string[] s1 = new string[] { &quot;&quot;, &quot;one&quot;, &quot;two&quot;, &quot;three&quot;, &quot;four&quot;, &quot;five&quot;, &quot;six&quot;, &quot;seven&quot;, &quot;eight&quot;, &quot;nine&quot;, &quot;ten&quot;, &quot;eleven&quot;, &quot;tweleve&quot;, &quot;thirteen&quot;, &quot;fourteen&quot;, &quot;fifteen&quot;, &quot;sixteen&quot;, &quot;seventeen&quot;, &quot;eighteen&quot;, &quot;nineteen&quot; };&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string[] s2 = new string[] { &quot;&quot;, &quot;&quot;, &quot;twenty&quot;, &quot;thirty&quot;, &quot;forty&quot;, &quot;fifty&quot;, &quot;sixty&quot;, &quot;seventy&quot;, &quot;eighty&quot;, &quot;ninety&quot; };&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (i &amp;lt; 20)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = s1[i];&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;j = i / 10;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt; //tens digit&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;k = i % 10; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//unit digit&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = s2[j] + &quot; &quot; + s1[k];&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return s;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public string GetNumInWordsByMath(double d)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;//19,23,45,67,89,12,34,56,789.87&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Rs &amp;nbsp;....., 67 Kharab,89 Arab,12 crore, 34 lacs, 56 thousands,7 hundred, 89 and 87 paise only&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//67,89,12,34,56,789.87&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Rs 67 Kharab,89 Arab,12 crore, 34 lacs, 56 thousands,7 hundred, 89 and 87 paise only&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string s=&quot;&quot;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;long myNum;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int iPaise, iDigit, iHundred, iThousand, iLac, iCrore, iArab, iKharab;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;//let d=1234567898765.43&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 25%10=5 (return Remainder) applicable in Integer only&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 25/10=2 (return Quotient) applicable in Integer only&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myNum = (long)(d*100); &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//myNum=1234567898765.43*100 =123456789876543&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iPaise = (int)(myNum % 100); &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//iPaise=123456789876543%100 =43&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myNum = myNum / 100; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//myNum=123456789876543/100 &amp;nbsp;=1234567898765&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iDigit = (int)(myNum % 100); &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//iDigit=1234567898765 %100 &amp;nbsp;=65&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myNum &amp;nbsp;= myNum / 100; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//myNum =1234567898765 /100 &amp;nbsp; =12345678987&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iHundred =(int)( myNum % 10);&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt; //iHundred=12345678987 %10 &amp;nbsp; =7&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myNum = myNum / 10; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//myNum =12345678987/10 &amp;nbsp; &amp;nbsp; &amp;nbsp;=1234567898&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iThousand = (int)(myNum % 100); &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//iThousand=1234567898%100 =98&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myNum = myNum / 100; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;//myNum=1234567898/100 &amp;nbsp; &amp;nbsp; &amp;nbsp;=12345678&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iLac = (int)(myNum % 100); &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//iLac=12345678%100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=78&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myNum = myNum / 100; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//myNum=12345678/100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =123456&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iCrore = (int)(myNum % 100); &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;&amp;nbsp;//iCrore=123456%100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=56&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myNum = myNum / 100; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//myNum=123456/100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =1234&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iArab = (int)(myNum % 100); &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//iArab=1234%100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =34&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myNum = myNum / 100; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//myNum=1234/100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =12&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;iKharab = (int)(myNum % 100); &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//iKharab=12%100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =12&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myNum = myNum / 100; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//myNum=12/100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =0&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (iKharab &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s = this.GetDigitInWordsByMath(iKharab) + ((iKharab &amp;gt; 1) ? &quot; Kharabs &quot; : &quot; Kharab &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (iArab &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWordsByMath(iArab) + ((iArab &amp;gt; 1) ? &quot; Arabs &quot; : &quot; Arab &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (iCrore &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWordsByMath(iCrore) + ((iCrore &amp;gt; 1) ? &quot; Crores &quot; : &quot; Crore &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (iLac &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWordsByMath(iLac) + ((iLac &amp;gt; 1) ? &quot; Lacs &quot; : &quot; Lac &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (iThousand &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWordsByMath(iThousand) + ((iThousand &amp;gt; 1) ? &quot; Thousands &quot; : &quot; Thousand &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (iHundred &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWordsByMath(iHundred) + ((iHundred &amp;gt; 1) ? &quot; Hundreds &quot; : &quot; Hundred &quot;);&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (iDigit &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += this.GetDigitInWordsByMath(iDigit) + &quot; &quot;;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (iPaise &amp;gt; 0)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s += &amp;nbsp;&quot;and &quot; + this.GetDigitInWordsByMath(iPaise) + ((iPaise &amp;gt; 1) ? &quot; Paises &quot; : &quot; Paise &quot;);&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;s= &quot;Rs &quot; + s + &quot;only&quot;;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return s;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;} &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//class&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;class Program&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;static void Main(string[] args)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AK_NumberToWords&amp;nbsp;nw1 = new AK_NumberToWords();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string myAns,myVal;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;do&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.WriteLine(&quot;Please enter 2 digit no to get its value in words&quot;);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myVal = Console.ReadLine();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.WriteLine(&quot;{0} in words is={1}&quot;, myVal,&amp;nbsp;nw1.GetDigitInWords(Convert.ToInt32(myVal)));&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.WriteLine(&quot;\nPlease enter any number to get its value in words:&quot;);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myVal = Console.ReadLine();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.WriteLine(&quot;{0} in words is=\n {1}&quot;, myVal,&amp;nbsp;nw1.GetNoInWords(Convert.ToDouble(myVal)));&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Console.WriteLine(&quot;\nPlease enter any number to get its value in words using math logic:&quot;);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myVal = Console.ReadLine();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.WriteLine(&quot;{0} in words is=\n {1}&quot;, myVal,&amp;nbsp;nw1.GetNumInWordsByMath(Convert.ToDouble(myVal)));&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.WriteLine(&quot;Do u want to try more?(Y/N)&quot;);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;myAns = Console.ReadLine();&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} while (myAns == &quot;Y&quot; || myAns == &quot;y&quot;);&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;}&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//class program&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;}&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bf9000;&quot;&gt;//namespace&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div&gt;Friends, as I already told, it is just one of many different algo used to convert number into words.&lt;/div&gt;&lt;div&gt;Of course, there are lot of ways to minimize/modify it to get more accuracy, speed, &amp;amp; less memory consumption etc.&lt;/div&gt;&lt;div&gt;I hope it would help you.&lt;/div&gt;&lt;div&gt;Wish you a very happy programming.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/2788610558874289984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2011/04/how-to-convert-number-into-words.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/2788610558874289984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/2788610558874289984'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2011/04/how-to-convert-number-into-words.html' title='How to convert number into words in C Sharp.Net'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-7750711404073316643</id><published>2011-04-21T03:32:00.000-07:00</published><updated>2011-04-23T00:46:24.831-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Date based trial version Algo"/><category scheme="http://www.blogger.com/atom/ns#" term="Date based trial version of window application software"/><category scheme="http://www.blogger.com/atom/ns#" term="how to get Hard drive serial no via vb6"/><category scheme="http://www.blogger.com/atom/ns#" term="how to read and write data in text files via vb.net"/><title type='text'>How to make TRIAL version( Date based) section in Window Application Software</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;RAM RAM Friends&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-size: medium;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;How to make TRIAL version (Date based) section in Window Application Software&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;Hi Friends, when I used to learn how to make complete software during my MCA, I face lot of problem to find a way to provide Trial version option in my projects so that they would run in trial mode for some time/days &amp;amp; after that they need registration to continue.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;Now I am providing here a way to resolve such problem by one way out of many possible ways &amp;amp; this is&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: center;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: large;&quot;&gt;Trial Version (Date based).&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;/div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;First I had mentioned the algo to explain its working then&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;I gave code to implement it in VB6.0 &amp;amp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;Then code in VB.NET&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;Here it goes&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;br /&gt;
&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;1. ALGO&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;({[EVALUATION/DEMO/TRIAL version Management Plan]})&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: left;&quot;&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Return “&lt;b&gt;AK_Expired&lt;/b&gt;” key from registry&lt;/li&gt;
&lt;li&gt;If&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_Expired&lt;/b&gt;=false or 1 (or any other value indicating evaluation expired)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Disable&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;evaluation&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;button&lt;/li&gt;
&lt;li&gt;Show message “Evatuation period expired etc”&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else //if&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_Expired&lt;/b&gt;=true or 0 (or any other value indicating evaluation not expired)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;Search&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_StartDt.akk&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;(&lt;/span&gt;or any other name you like) present in computer “Windows” Directory (or any other place in computer you like)&lt;/li&gt;
&lt;li&gt;If&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_StartDt.akk&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;file not present in computer “Windows” directory&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Create new file&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_StartDt.akk&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;in computer “Windows” Directory &amp;amp; write current date&amp;nbsp;in this file.&lt;/li&gt;
&lt;li&gt;Create another file&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_EndDt.akk&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;in computer “Window” directory &amp;amp; write new date&amp;nbsp;which is equal to (current date + 31 days).&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;E&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;nter current date in “&lt;b&gt;AK_LastUsedDt&lt;/b&gt;” key in registry&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;ɼourier New\&#39;&#39;;&quot;&gt;Display label “Demo Version........ Just for 31 Days.”&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;ɼourier New\&#39;&#39;;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;ɼourier New\&#39;&#39;;&quot;&gt;Enable evaluation button.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;ɼourier New\&#39;&#39;;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else if&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_StartDt.akk&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;file present in computer “Windows” Directory&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Return&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;F&lt;/span&gt;&lt;b&gt;irstDate&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;from&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_StartDt.akk&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;file&lt;/li&gt;
&lt;li&gt;Return&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;L&lt;/span&gt;&lt;b&gt;astDate&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;from&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_EndDt.akk&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;file&lt;/li&gt;
&lt;li&gt;Return&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;L&lt;/span&gt;&lt;b&gt;astUseDate&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;from “&lt;b&gt;AK_LastUsedDt&lt;/b&gt;” key in registry&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;//first level of security for evaluation&lt;/li&gt;
&lt;li&gt;If&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;LastUseDate&lt;/b&gt;=” ”&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;enter current date in “&lt;b&gt;AK_LastUsedDt&lt;/b&gt;” key in registry&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else if&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;LastUseDate&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;is a date&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;if&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;LastUseDate&lt;/b&gt;&lt;/span&gt;&amp;gt;&lt;span style=&quot;color: black;&quot;&gt;current date&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;display message “Evaluation Expired …. Contact ABC”&lt;/li&gt;
&lt;li&gt;disable “&lt;b&gt;Evaluation&lt;/b&gt;” button&lt;/li&gt;
&lt;li&gt;enter False or 1 in “&lt;b&gt;AK_Expired&lt;/b&gt;” key in registry&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;else&amp;nbsp; //if&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;LastUseDate&lt;/b&gt;&lt;/span&gt;&amp;lt;=&lt;span style=&quot;color: black;&quot;&gt;current date&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;enter current date in “&lt;b&gt;AK_LastUsedDt&lt;/b&gt;” key in registry&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;end if&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else // if&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;LastUseDate&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;is other than date or “ ”&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;display message “Evaluation Expired …. Contact ABC”&lt;/li&gt;
&lt;li&gt;disable “&lt;b&gt;Evaluation&lt;/b&gt;” button&lt;/li&gt;
&lt;li&gt;enter False or 1 in “&lt;b&gt;AK_Expired&lt;/b&gt;” key in registry&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End if&amp;nbsp; // If LastUseDate=” ”&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&amp;nbsp;//Second Level of security for evaluation&lt;/li&gt;
&lt;li&gt;If currend date &amp;lt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;FirstDate&lt;/b&gt;&amp;nbsp; or current date &amp;gt;&lt;b&gt;LastDate&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;display message “Evaluation Expired …. Contact ABC”&lt;/li&gt;
&lt;li&gt;disable “&lt;b&gt;Evaluation&lt;/b&gt;” button&lt;/li&gt;
&lt;li&gt;enter False or 1 in “&lt;b&gt;AK_Expired&lt;/b&gt;” key in registry&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Show message “only (31-(current date-&lt;b&gt;FirstDate&lt;/b&gt;)) days are remaining”&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End if&amp;nbsp; // If current date &amp;lt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;FirstDate&lt;/b&gt;&amp;nbsp; or current date &amp;gt;&lt;b&gt;LastDate&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End if&amp;nbsp;&amp;nbsp; // If&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_StartDt.akk&lt;/b&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;file not present in computer “Windows” directory&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&amp;nbsp;End if&amp;nbsp; // If&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;AK_Expired&lt;/b&gt;=false or 1&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;Note:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;1. I have used following keys to store information in Registry&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;1. AK_Expired&amp;nbsp;&amp;nbsp; 2. AK_LastUsedDt&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;2. I have used following files to store information in Windows directory&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;1. AK_StartDt.akk&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. AK_EndDt.akk&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;3&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;To provide more security, you can use any other location or any other keyname/file name &amp;amp; write encrypted information there.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;DRAWBACKS&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;As almost all things in universe have few or more drawbacks, this algo also has one drawbacks&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;If after installing &amp;amp; using your software at least one time, user changes his/her system date &amp;amp; then open your software then your software shows&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&quot;Trial version expired...............&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;SOLUTION ---------&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;Since there is no proper solutions, but you can make a small exe which would erase all/few of the evaluation securities or correct them to activate your software in evaluation mode.&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;since one can use the same exe more than one time, so to protect it, you can use either pwd (hard coded or dynamic(based on current date,time,etc), or do some coding so that this file execute only once in its life cycle etc.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;since sometime after using your evaluation version, user can ask you after some time(days/months/yrs) that he want to use it again or there may be some other porblem, the above solution would be useful in such cases also.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;VB6.0 Code to implement the above algo&lt;/b&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom: double windowtext 2.25pt; border: none; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;&quot;&gt;&lt;div style=&quot;border: none; margin-bottom: .0001pt; margin: 0in; mso-border-bottom-alt: double windowtext 2.25pt; mso-padding-alt: 0in 0in 1.0pt 0in; padding: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;‘ Below is the api function must write in module1 or somewhere else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Public Declare Function GetWindowsDirectory Lib &quot;kernel32.dll&quot; _&lt;/li&gt;
&lt;li&gt;Alias &quot;GetWindowsDirectoryA&quot; (ByVal lpBuffer As String, ByVal nSize As Integer) As Long&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #b45f06;&quot;&gt;Note:-----Below procedure must be put in either startup procedure of project or in load event of evaluation form&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;‘get the Window directory path&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;strTemp = String$(255, Chr(0))&lt;/li&gt;
&lt;li&gt;lngRetVal = GetWindowsDirectory(strTemp, Len(strTemp))&lt;/li&gt;
&lt;li&gt;strTemp = Replace(strTemp, Chr(0), &quot;&quot;)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;‘Get Hard drive serial no to act as Project password. You can encrypt it to make software more secure&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp;&#39;--Begin-------how to get Hard drive serial no via vb6------------------&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Dim FS As FileSystemObject&lt;/li&gt;
&lt;li&gt;Set FS = New FileSystemObject&lt;/li&gt;
&lt;li&gt;Dim d As Drive&lt;/li&gt;
&lt;li&gt;Set d = FS.GetDrive(&quot;C:&quot;)&lt;/li&gt;
&lt;li&gt;GValidNo = Abs(d.SerialNumber)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp;&#39;--End-------how to get Hard drive serial no via vb6------------------&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;‘Get Project password (here Hard drive Serial No) from registry&lt;/li&gt;
&lt;li&gt;mactno = GetSetting(&quot;ArunKakkarCompany &quot;, &quot; AK_Proj1&quot;, &quot;AK_MacPwd&quot;)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;‘Check if software is registered or not&lt;/li&gt;
&lt;li&gt;If mactno = GValidNo Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;‘below are the various controls on the evaluation form&lt;/li&gt;
&lt;li&gt;Me.Frame1.Visible = False&lt;/li&gt;
&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Visible = True&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If GetSetting(&quot;ArunKakkarCompany &quot;, &quot; AK_Proj1&quot;, &quot; AK_Expired &quot;) &amp;lt;&amp;gt; &quot;1&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If FS.FileExists(strTemp &amp;amp; &quot;\ AK_StartDt.akk &quot;) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Fl = FreeFile&amp;nbsp;&lt;/li&gt;
&lt;li&gt;‘here reading date from file which(date) is stored as day in 1&lt;sup&gt;st&lt;/sup&gt; line, ‘month in 2&lt;sup&gt;nd&lt;/sup&gt; line &amp;amp; year in&amp;nbsp;3&lt;sup&gt;rd&lt;/sup&gt; line of file to make a small kind of encryption&amp;nbsp;&amp;amp; converting it into d/m/yyyy format &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/li&gt;
&lt;li&gt;‘open file in read only mode &amp;nbsp;&lt;/li&gt;
&lt;li&gt;Open strTemp &amp;amp; &quot;\ AK_StartDt.akk &quot; For Input As #Fl&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;S1 = &quot;&quot;&lt;/li&gt;
&lt;li&gt;Do While Not EOF(Fl) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;‘read one line from file &amp;amp; store value in s&lt;/li&gt;
&lt;li&gt;Input #Fl, S&lt;/li&gt;
&lt;li&gt;If S1 = &quot;&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;S1 = S&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;S1 = S1 &amp;amp; &quot;/&quot; &amp;amp; S&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Loop&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Close #Fl&lt;/li&gt;
&lt;li&gt;S1 = Format(S1, &quot;D/M/YYYY&quot;)&lt;/li&gt;
&lt;li&gt;Fl = FreeFile&lt;/li&gt;
&lt;li&gt;Open strTemp &amp;amp; &quot;\ AK_EndDt.akk &quot; For Input As #Fl&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;S2 = &quot;&quot;&lt;/li&gt;
&lt;li&gt;Do While Not EOF(Fl)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Input #Fl, S&lt;/li&gt;
&lt;li&gt;If S2 = &quot;&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;S2 = S&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;S2 = S2 &amp;amp; &quot;/&quot; &amp;amp; S&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Loop&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Close #Fl&lt;/li&gt;
&lt;li&gt;S2 = Format(S2, &quot;D/M/YYYY&quot;)&lt;/li&gt;
&lt;li&gt;LastUsedDate = GetSetting(&quot;ArunKakkarCompany &quot;, &quot;AK_Proj1&quot;, &quot;AK_LastUsedDt&quot;)&lt;/li&gt;
&lt;li&gt;If LastUsedDate = &quot;&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;SaveSetting &quot; ArunKakkarCompany &quot;, &quot;AK_Proj1&quot;, &quot;AK_LastUsedDt&quot;, Date&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;ElseIf CDate(LastUsedDate) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If (Date - CDate(LastUsedDate)) &amp;lt; 0 Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Visible = True&lt;/li&gt;
&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Caption = &quot;EVALUATION EXPIRED...., contact ArunKakkarCompany &quot;&lt;/li&gt;
&lt;li&gt;Me.Frame1.Visible = True&lt;/li&gt;
&lt;li&gt;Me.lblUseEavl.Enabled = False&lt;/li&gt;
&lt;li&gt;Timer1.Enabled = False&lt;/li&gt;
&lt;li&gt;SaveSetting &quot; ArunKakkarCompany &quot;, &quot;AK_Proj1&quot;, &quot;AK_Expired&quot;, &quot;1&quot;&lt;/li&gt;
&lt;li&gt;Me.lblUseEavl.Enabled = False&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;SaveSetting &quot; ArunKakkarCompany &quot;, &quot;AK_Proj1&quot;, &quot;AK_LastUsedDt&quot;, Date&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt; &amp;nbsp; &amp;nbsp; //If LastUsedDate = &quot;&quot; Then&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Visible = True&lt;/li&gt;
&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Caption = &quot;Evaluation Expired...., contact ArunKakkarCompany &quot;&lt;/li&gt;
&lt;li&gt;Me.Frame1.Visible = True&lt;/li&gt;
&lt;li&gt;Me.lblUseEavl.Enabled = False&lt;/li&gt;
&lt;li&gt;Timer1.Enabled = False&lt;/li&gt;
&lt;li&gt;SaveSetting &quot; ArunKakkarCompany &quot;, &quot;AK_Proj1&quot;, &quot;AK_Expired&quot;, &quot;1&quot;&lt;/li&gt;
&lt;li&gt;Me.lblUseEavl.Enabled = False&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; //If LastUsedDate = &quot;&quot; Then&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;If DateDiff(&quot;d&quot;, Date, S1) &amp;gt; 0 Or DateDiff(&quot;d&quot;, Date, S2) &amp;lt; 0 Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Visible = True&lt;/li&gt;
&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Caption = &quot;Evaluation Expired...., contact ArunKakkarCompany &quot;&lt;/li&gt;
&lt;li&gt;Me.Frame1.Visible = True&lt;/li&gt;
&lt;li&gt;Me.lblUseEavl.Enabled = False&lt;/li&gt;
&lt;li&gt;Timer1.Enabled = False&lt;/li&gt;
&lt;li&gt;SaveSetting &quot; ArunKakkarCompany &quot;, &quot;AK_Proj1&quot;, &quot;AK_Expired&quot;, &quot;1&quot;&lt;/li&gt;
&lt;li&gt;Me.lblUseEavl.Enabled = False&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Visible = True &amp;nbsp; &amp;nbsp;&#39;Change&lt;/li&gt;
&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Caption = &quot;Only &quot; &amp;amp; (31 - Val(DateDiff(&quot;D&quot;, CDate(S1), Date))) &amp;amp; &quot; Days are Remaining&quot;&lt;/li&gt;
&lt;li&gt;&#39;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Caption = &quot;Only &quot; &amp;amp; 31 &amp;amp; &quot; Days are Remaining&quot;&lt;/li&gt;
&lt;li&gt;&#39;Me.lblUseEavl.Enabled = True&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&amp;nbsp; //If FS.FileExists(strTemp &amp;amp; &quot;\ AK_StartDt.akk &quot;) Then&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Fl = FreeFile&lt;/li&gt;
&lt;li&gt;Open strTemp &amp;amp; &quot;\AK_StartDt.akk&quot; For Output As #Fl&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Print #Fl, Format(Day(Date), &quot;0#&quot;)&lt;/li&gt;
&lt;li&gt;Print #Fl, Format(Month(Date), &quot;#&quot;)&lt;/li&gt;
&lt;li&gt;Print #Fl, Year(Date)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Close #Fl&lt;/li&gt;
&lt;li&gt;EndDt = CDate(DateAdd(&quot;D&quot;, 31, Date))&lt;/li&gt;
&lt;li&gt;Fl = FreeFile&lt;/li&gt;
&lt;li&gt;Open strTemp &amp;amp; &quot;\AK_EndDt.akk&quot; For Output As #Fl&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Print #Fl, Format(Day(EndDt), &quot;0#&quot;)&lt;/li&gt;
&lt;li&gt;Print #Fl, Format(Month(EndDt), &quot;#&quot;)&lt;/li&gt;
&lt;li&gt;Print #Fl, Year(EndDt)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Close #Fl&lt;/li&gt;
&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Visible = True&lt;/li&gt;
&lt;li&gt;SaveSetting &quot;ArunKakkarCompany &quot;, &quot;AK_Proj1&quot;, &quot;AK_LastUsedDt&quot;, Date&lt;/li&gt;
&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Caption = &quot;Demo Version........ Just for 31 Days.&quot;&lt;/li&gt;
&lt;li&gt;Me.lblUseEavl.Enabled = True&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&amp;nbsp; //If FS.FileExists(strTemp &amp;amp; &quot;\ AK_StartDt.akk &quot;) Then&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt; //If GetSetting(&quot;ArunKakkarCompany &quot;, &quot; AK_Proj1&quot;, &quot; AK_Expired &quot;) &amp;lt;&amp;gt; &quot;1&quot; Then&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Visible = True&lt;/li&gt;
&lt;li&gt;&lt;st1:state w:st=&quot;on&quot;&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Me.&lt;/st1:place&gt;&lt;/st1:state&gt; lblMsg.Caption = &quot;Evaluation Expired...., Contact ArunKakkarCompany &quot;&lt;/li&gt;
&lt;li&gt;Me.Frame1.Visible = True&lt;/li&gt;
&lt;li&gt;Me.lblUseEavl.Enabled = False&lt;/li&gt;
&lt;li&gt;Timer1.Enabled = False&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;//If GetSetting(&quot;ArunKakkarCompany &quot;, &quot; AK_Proj1&quot;, &quot; AK_Expired &quot;) &amp;lt;&amp;gt; &quot;1&quot; Then&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;//If mactno = GValidNo Then&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom: solid windowtext 1.0pt; border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;&quot;&gt;&lt;div style=&quot;border: none; margin-bottom: .0001pt; margin: 0in; mso-border-bottom-alt: solid windowtext .75pt; mso-padding-alt: 0in 0in 1.0pt 0in; padding: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 13.5pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Below is the VB.NET Code&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;Here along with date/time based trial version procedure, I also put a small/low quality startup sequence of starting any application software.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;of course, there are lot of great ways to make software startup/security much more powerful &amp;amp; secure.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 18px;&quot;&gt;Below code is the small portion of my small project &quot;Cure&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;========================================================&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;color: black;&quot;&gt;Private Sub frmCure_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;lblContactUs.Text = GDvlprCompanyName &amp;amp; vbNewLine &amp;amp; GDvlprCompanyAddress &amp;amp; vbNewLine &amp;amp; GDvlprCompanyPhoneNo &amp;amp; vbNewLine &amp;amp; GDvlprCompanyEmailId &amp;amp; vbNewLine &amp;amp; GDvlprCompanyWebsite&lt;/li&gt;
&lt;li&gt;lblActivate.Visible = False&lt;/li&gt;
&lt;li&gt;txtActivate.Visible = False&lt;/li&gt;
&lt;li&gt;btnActivate.Visible = False&lt;/li&gt;
&lt;li&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Main&lt;/st1:place&gt;(Me)&lt;/li&gt;
&lt;li&gt;CheckEvaluationPeriod(Me)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Sub&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;----------------&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39;Begin---Start point of Cure Project------------------------&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Public Sub Main(ByVal frm As Form)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39;Planning+++++++++++++++++++++++++++++++++++++++++++++&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39;1 Change computer/system date format to dd/mm/yyyy&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39;2 return registration key (rk) from registry&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39;3 if rk =” “or rk not found/exists&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39; Show “Start up” form&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39; Else&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39; Return activation key (ak) by calling appropriate function(say createAK) using os drive serial no&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39; If ak != rk&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39; Show “Start Up” form&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39; Else &amp;nbsp; &amp;nbsp;//if ak=rk&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39; Call function to start s/w (say StartSoftware)&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39; End If&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39; End If&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39;+++++++++++++++++++++++++++++++++++++++++++++++++&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39;ChangeDateFormat()&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Try&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CureSecurity(enCureSecurity.ChangeDateFormat)&lt;/li&gt;
&lt;li&gt;Dim rk As String&lt;/li&gt;
&lt;li&gt;rk = My.Computer.Registry.GetValue(GKeyPath, GRegistrationKey, &quot;&quot;)&lt;/li&gt;
&lt;li&gt;If rk = &quot;&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;frm.Show()&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim ak As String&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39;ak = retUsrNo(OS_Drive_SNo)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;ak = CureSecurity(enCureSecurity.SoftwareActivationKey)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;If ak = rk Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #6aa84f;&quot;&gt;&#39;frm.Close()&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;OpenRegisteredCure(frm)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;frm.Show()&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Catch ex As Exception&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CureErrorMsg(ex, &quot;frmModuleFunction-Main&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Try&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Sub&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;---------------&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Public Function CureSecurity(ByVal Work As enCureSecurity, Optional ByVal UserMachineCode As String = &quot;A&quot;) As String&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim s As String = &quot;&quot;&lt;/li&gt;
&lt;li&gt;Try&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim temp As String = &quot;&quot;&lt;/li&gt;
&lt;li&gt;Dim ak As New ArunKakkarSoft.ArunKakkarSWReg&lt;/li&gt;
&lt;li&gt;temp = My.Computer.FileSystem.SpecialDirectories.Desktop&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;retrieve the os drive name &amp;amp; then os drive Windows directory path&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;temp = temp.Substring(0, 1)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Select Case Work&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Case enCureSecurity.ChangeDateFormat&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ak.ChangeDateFormat()&lt;/li&gt;
&lt;li&gt;s = &quot;&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Case enCureSecurity.SoftwareActivationKey&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;s = ak.GetActivateCodeForSoftware(ak.GetDriveSerialNo(temp))&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Case enCureSecurity.UserActivationKey&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;s = ak.GetActivateCodeForUser(UserMachineCode)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Case enCureSecurity.UserMachineCode&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;s = ak.GetUserMachineCode(ak.GetDriveSerialNo(temp))&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;End Select&lt;/li&gt;
&lt;li&gt;ak = Nothing&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Catch ex As Exception&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CureErrorMsg(ex, &quot;frmModuleFunction-CureSecurity&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Try&lt;/li&gt;
&lt;li&gt;Return s&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Function&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;--------------&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Public Sub CheckEvaluationPeriod(ByVal frm As frmCureEvaluation)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Return “AK_Expired” key from registry&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;If AK_Expired = False Or 1 Then&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Disable evaluation button&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Show message “Evatuation period expired etc”&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Else //if AK_Expired=true or 0&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Search AK_StartDt.akk or another name (like AK_StartDt.akk) present in computer “Windows”&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;Directory()&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;If AK_StartDt.akk file not present in computer “Windows” directory&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;1Create new file AK_StartDt.akk in computer “Windows” Directory&amp;nbsp;&amp;amp; write current date in this file&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;2 Create another file AK_EndDt.akk in computer “Window” directory&amp;nbsp;&amp;amp; write new date which is equal to (current date + 31 days)&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;3 enter current date in “AK_LastUsedDt” key in registry&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;4 &amp;nbsp;display label Demo Version........ Just for 31 Days.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;5 &amp;nbsp;enable evaluation button&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Else if AK_StartDt.akk file present in computer “Windows” Directory&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Return FirstDate from AK_StartDt.akk file&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Return LastDate from AK_EndDt.akk file&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Return LastUseDate from “AK_LastUsedDt” key in registry&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;//first level of security for evaluation&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;If LastUseDate = &quot; &quot; Then&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;enter current date in “AK_LastUsedDt” key in registry&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Else if LastUseDate is a date&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;if LastUseDate&amp;gt;current date&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;display message “Evaluation Expired …. Contact ABC”&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;disable “Evaluation” button&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;enter False or 1 in “AK_Expired” key in registry&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;else &amp;nbsp;//if LastUseDate&amp;lt;=current date&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;enter current date in “AK_LastUsedDt” key in registry&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;End If&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Else // if LastUseDate is other than date or “ ”&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;display message “Evaluation Expired …. Contact ABC”&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;disable “Evaluation” button&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;enter False or 1 in “AK_Expired” key in registry&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;End if &amp;nbsp;// If LastUseDate=” ”&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;//Second Level of security for evaluation&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;If currend date &amp;lt; FirstDate &amp;nbsp;or current date &amp;gt;LastDate&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;display message “Evaluation Expired …. Contact ABC”&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;disable “Evaluation” button&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;enter False or 1 in “AK_Expired” key in registry&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Else&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Show message “only (31-(current date-FirstDate)) days are remaining”&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;End if &amp;nbsp;// If currend date &amp;lt; FirstDate &amp;nbsp;or current date &amp;gt;LastDate&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;End if &amp;nbsp; // If AK_StartDt.akk file not present in computer “Windows” directory&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;End if &amp;nbsp;// If AK_Expired=false or 1&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Dim f1 As New frmCureEvaluation&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Try&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim ActiveKey As String&lt;/li&gt;
&lt;li&gt;Dim FirstDate, LastDate, LastUseDate, temp2 As String&lt;/li&gt;
&lt;li&gt;Dim i As Integer&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;if activekey=1 then evaluation expired&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;ActiveKey = My.Computer.Registry.GetValue(GKeyPath, GIsActive, &quot;0&quot;)&lt;/li&gt;
&lt;li&gt;If ActiveKey = &quot;1&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ExpireEvaluation(frm, False)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else &amp;nbsp; &amp;nbsp;&#39;activekey=0 &amp;nbsp; &#39;active key&amp;lt;&amp;gt;1&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If Not My.Computer.FileSystem.FileExists(GetCureFilePath(CureFiles.Cure_dll)) Then &amp;nbsp;&#39;if Cure.dll file not found&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;write to Cure.dll&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;WriteToFile(CureFiles.Cure_dll, Format(Now.Day, &quot;0#&quot;), False)&lt;/li&gt;
&lt;li&gt;WriteToFile(CureFiles.Cure_dll, Format(Now.Month, &quot;#&quot;), True)&lt;/li&gt;
&lt;li&gt;WriteToFile(CureFiles.Cure_dll, Now.Year, True)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;write to Cure1.dll&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Dim LastDt As Date&lt;/li&gt;
&lt;li&gt;LastDt = DateAdd(DateInterval.Day, 31, Now.Date)&lt;/li&gt;
&lt;li&gt;WriteToFile(CureFiles.Cure1_dll, Format(LastDt.Day, &quot;0#&quot;), False)&lt;/li&gt;
&lt;li&gt;WriteToFile(CureFiles.Cure1_dll, Format(LastDt.Month, &quot;#&quot;), True)&lt;/li&gt;
&lt;li&gt;WriteToFile(CureFiles.Cure1_dll, LastDt.Year, True)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;write to registry&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;My.Computer.Registry.SetValue(GKeyPath, GLastUsed, Now.Date.ToShortDateString)&lt;/li&gt;
&lt;li&gt;frm.lblEvaluationMsg.Text = &quot;Demo Version........ Just for 31 Days.&quot;&lt;/li&gt;
&lt;li&gt;frm.btnEvaluation.Enabled = True&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt; &#39;if Cure.dll file found&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;read from Cure.dll&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;FirstDate = &quot;&quot;&lt;/li&gt;
&lt;li&gt;For i = 1 To 3&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;temp2 = ReadFromFile(CureFiles.Cure_dll, i)&lt;/li&gt;
&lt;li&gt;If FirstDate = &quot;&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;FirstDate = temp2&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;FirstDate = FirstDate &amp;amp; &quot;/&quot; &amp;amp; temp2&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Next&lt;/li&gt;
&lt;li&gt;If IsDate(FirstDate) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;FirstDate = Format(CDate(FirstDate), &quot;d/M/yyyy&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt; &#39;if someone make changes in file data&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ExpireEvaluation(frm, True)&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&#39;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;read from Cure1.dll&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;LastDate = &quot;&quot;&lt;/li&gt;
&lt;li&gt;If My.Computer.FileSystem.FileExists(GetCureFilePath(CureFiles.Cure1_dll)) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;For i = 1 To 3&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;temp2 = ReadFromFile(CureFiles.Cure1_dll, i)&lt;/li&gt;
&lt;li&gt;If LastDate = &quot;&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;LastDate = temp2&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;LastDate = LastDate &amp;amp; &quot;/&quot; &amp;amp; temp2&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Next&lt;/li&gt;
&lt;li&gt;If IsDate(LastDate) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;LastDate = Format(CDate(LastDate), &quot;d/M/yyyy&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt; &#39;if someone make changes in file data&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ExpireEvaluation(frm, True)&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&#39;if Cure1.dll file not found&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ExpireEvaluation(frm, True)&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;verify again that FirstDate &amp;amp; LastDate are valid date else evaluation expire&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;If Not (IsDate(FirstDate) And IsDate(LastDate)) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ExpireEvaluation(frm, True)&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;get LastUseDate from registry&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;LastUseDate = My.Computer.Registry.GetValue(GKeyPath, GLastUsed, &quot;&quot;)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;first level of security for evaluation&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;If LastUseDate = &quot;&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;My.Computer.Registry.SetValue(GKeyPath, GLastUsed, Now.Date.ToShortDateString)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;ElseIf IsDate(LastUseDate) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If (CDate(LastUseDate) &amp;gt; Now.Date) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ExpireEvaluation(frm, True)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&#39;if LastUseDate&amp;lt;=CurrentDate&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;My.Computer.Registry.SetValue(GKeyPath, GLastUsed, Now.Date.ToShortDateString)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt; &#39;if LastUseDate is not a date &amp;amp; not empty&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ExpireEvaluation(frm, True)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Second Level of Security for evaluation&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;If (Now.Date &amp;lt; CDate(FirstDate)) Or (Now.Date &amp;gt; CDate(LastDate)) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ExpireEvaluation(frm, True)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;frm.lblEvaluationMsg.Text = &quot;EVALUATION VERSION-------&amp;gt;&amp;gt;&amp;gt;Only &quot; &amp;amp; (31 - (Now.Date - CDate(FirstDate)).Days) &amp;amp; &quot; days are remaining!!!!!&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp;&#39;If Not My.Computer.FileSystem.FileExists(filePath) Then &amp;nbsp;&#39;if Cure.dll file not found&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;If ActiveKey &amp;lt;&amp;gt; &quot;0&quot; Then&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Catch ex As Exception&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CureErrorMsg(ex, &quot;frmModuleFunction-CheckEvaluationPeriod&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Try&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Sub&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;--------------&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Public Sub ExpireEvaluation(ByVal frm As frmCureEvaluation, Optional ByVal ModifyActiveKey As Boolean = True)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Try&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim ExpireMsg As String&lt;/li&gt;
&lt;li&gt;ExpireMsg = &quot;EVALUATION EXPIRED...., contact ARUNKAKKARCOMPANY &quot;&lt;/li&gt;
&lt;li&gt;If ModifyActiveKey Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;My.Computer.Registry.SetValue(GKeyPath, GIsActive, &quot;1&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;frm.lblEvaluationMsg.Text = ExpireMsg&lt;/li&gt;
&lt;li&gt;frm.btnEvaluation.Enabled = False&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Catch ex As Exception&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CureErrorMsg(ex, &quot;frmModuleFunction-ExpireEvaluation&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Try&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Sub&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;---------------------&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&#39;Begin-----File Handling in VB.NET ---------------------------------------------------------&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Public Function GetCureFilePath(ByVal file As CureFiles) As String&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim path As String = &quot;&quot;&lt;/li&gt;
&lt;li&gt;Try&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim temp As String&lt;/li&gt;
&lt;li&gt;temp = My.Computer.FileSystem.SpecialDirectories.Desktop&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;retrieve the os drive name &amp;amp; then os drive Windows directory path&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;temp = temp.Substring(0, 1) &amp;amp; &quot;:\Windows\&quot; &amp;nbsp;&#39;Cure.dll&quot;&lt;/li&gt;
&lt;li&gt;path = &quot;&quot;&lt;/li&gt;
&lt;li&gt;Select Case file&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Case CureFiles.Cure_dll&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;path = temp &amp;amp; &quot;Cure.dll&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Case CureFiles.Cure1_dll&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;path = temp &amp;amp; &quot;Cure1.dll&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Case CureFiles.CurePurchaseOrder_txt&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;path = My.Computer.FileSystem.SpecialDirectories.Desktop &amp;amp; &quot;\CurePurchaseOrder.txt&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Case CureFiles.CureServer_ini&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;path = My.Application.Info.DirectoryPath &amp;amp; &quot;\CureServer.ini&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Case CureFiles.CureDataBaseFile&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;path = My.Application.Info.DirectoryPath &amp;amp; &quot;\CureData\Cure.mdf&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Case CureFiles.CureDataBaseLogFile&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;path = My.Application.Info.DirectoryPath &amp;amp; &quot;\CureData\Cure_log.ldf&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;End Select&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Catch ex As Exception&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CureErrorMsg(ex, &quot;frmModuleFunction-GetCureFilePath&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Try&lt;/li&gt;
&lt;li&gt;Return path&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Function&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Public Sub WriteToFile(ByVal file As CureFiles, ByVal StringData As String, Optional ByVal AppendMode As Boolean = True)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Try&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim path As String&lt;/li&gt;
&lt;li&gt;path = GetCureFilePath(file)&lt;/li&gt;
&lt;li&gt;Dim fileWrt As System.IO.StreamWriter&lt;/li&gt;
&lt;li&gt;fileWrt = My.Computer.FileSystem.OpenTextFileWriter(path, AppendMode)&lt;/li&gt;
&lt;li&gt;fileWrt.WriteLine(StringData)&lt;/li&gt;
&lt;li&gt;fileWrt.Close()&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Catch ex As Exception&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CureErrorMsg(ex, &quot;frmModuleFunction-WriteToFile&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Try&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Sub&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Public Function ReadFromFile(ByVal file As CureFiles, ByVal lineno As Integer, Optional ByVal IsFullFile As Boolean = False) As String&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim line As String = &quot;&quot;&lt;/li&gt;
&lt;li&gt;Try&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim i As Integer&lt;/li&gt;
&lt;li&gt;Dim path As String&lt;/li&gt;
&lt;li&gt;path = GetCureFilePath(file)&lt;/li&gt;
&lt;li&gt;Using sr As StreamReader = New StreamReader(path)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;Read and display the lines from the file until the end&amp;nbsp;of the file is reached.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;If IsFullFile Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Dim s As String = &quot;&quot;&lt;/li&gt;
&lt;li&gt;i = 0&lt;/li&gt;
&lt;li&gt;Do&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;i = i + 1&lt;/li&gt;
&lt;li&gt;s = sr.ReadLine()&lt;/li&gt;
&lt;li&gt;If Not (s Is Nothing) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;line = line &amp;amp; vbNewLine &amp;amp; i &amp;amp; &quot; &quot; &amp;amp; s&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;st1:place w:st=&quot;on&quot;&gt;Loop&lt;/st1:place&gt; Until s Is Nothing&lt;/li&gt;
&lt;li&gt;line = Trim(line)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;For i = 1 To lineno - 1&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;line = sr.ReadLine()&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Next&lt;/li&gt;
&lt;li&gt;line = Trim(sr.ReadLine())&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;sr.Close()&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Using&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Catch ex As Exception&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CureErrorMsg(ex, &quot;frmModuleFunction-ReadFromFile&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Try&lt;/li&gt;
&lt;li&gt;Return line &amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&#39;ReadFromFile = line&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Function&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&#39;End-----File Handling in VB.NET ---------------------------------------------------------&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;I hope this would be helpful.&lt;/div&gt;&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;Best of luck for good programming.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/7750711404073316643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2011/04/how-to-make-trial-version-date-based.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/7750711404073316643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/7750711404073316643'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2011/04/how-to-make-trial-version-date-based.html' title='How to make TRIAL version( Date based) section in Window Application Software'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-3646230980193487024</id><published>2011-01-13T23:48:00.000-08:00</published><updated>2011-02-02T21:45:25.601-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic Chemistry Terms"/><category scheme="http://www.blogger.com/atom/ns#" term="Besic Chemistry Syllabus"/><category scheme="http://www.blogger.com/atom/ns#" term="Besic Chemistry Syllabus upto 10th Standard Students"/><category scheme="http://www.blogger.com/atom/ns#" term="Chemistry Important terms"/><title type='text'>Basic Chemistry Syllabus upto 10th Standard Students</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d; font-size: x-large;&quot;&gt;RAM RAM Friends&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Basic Chemistry &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Syllabus&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; upto 10th Standard Students&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
When I got chance to teach chemistry to students upto 10th standards, I found that they found chemistry very strange &amp;amp; non-understandable subject. So after spending some days with them, I observed that they don&#39;t know much about basics of Chemistry. So before getting started with their books, I teach them some basic topics of Chemistry which would be necessary &amp;amp; very helpful to understand &amp;amp; even love to study Chemistry.&lt;br /&gt;
So below is the very basic topics I used to cover before starting teaching Chemistry to make proper background in Chemistry so that they can understand Chemistry whenever &amp;amp; wherever they study it.&lt;br /&gt;
Due to lack of time, I had posted the pictures of syllabus as below&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-yYryFloVd_doGNpt3ngXTKLDM4JF-lW444cCbe9Adv8MG-0cxiLcm2SzUcxPZhQLN_o4vz3WMq769xK-xKjWDO3OKP2C1lG0MiS_7rS_E0k1q_Rqj2WpgdbSTEgqQjgyN5I2nJEs26M/s1600/Chenmistry+basic+Pg1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-yYryFloVd_doGNpt3ngXTKLDM4JF-lW444cCbe9Adv8MG-0cxiLcm2SzUcxPZhQLN_o4vz3WMq769xK-xKjWDO3OKP2C1lG0MiS_7rS_E0k1q_Rqj2WpgdbSTEgqQjgyN5I2nJEs26M/s1600/Chenmistry+basic+Pg1.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-n_uBsPm_4J-ly91KABrO5vhr20iUxAKeXdYutiogefj3qEmNKWOujpIgqaf35MZ5Q8w8sCMuxVc1RFTYRe2CCcmzt_CPyHXS5i9vZzJ50otD7HtSpEreFGDOUm5SuRsGr7xhtU-emoE/s1600/Chenmistry+basic+Pg2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-n_uBsPm_4J-ly91KABrO5vhr20iUxAKeXdYutiogefj3qEmNKWOujpIgqaf35MZ5Q8w8sCMuxVc1RFTYRe2CCcmzt_CPyHXS5i9vZzJ50otD7HtSpEreFGDOUm5SuRsGr7xhtU-emoE/s1600/Chenmistry+basic+Pg2.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd5GTp7JeHTC_UHbLVJRRieFcxA9j1FsqofPNlTgwm6NSgQOJJMmKDgV6d7pHXk8GXXRn90cug22zMCfyl4uIYBSBYM1BX_x9OB4XB4cgEA_78YSf6n8znOQi5liSgcQwqWJjk5oR5Iuc/s1600/Chenmistry+basic+Pg3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjd5GTp7JeHTC_UHbLVJRRieFcxA9j1FsqofPNlTgwm6NSgQOJJMmKDgV6d7pHXk8GXXRn90cug22zMCfyl4uIYBSBYM1BX_x9OB4XB4cgEA_78YSf6n8znOQi5liSgcQwqWJjk5oR5Iuc/s1600/Chenmistry+basic+Pg3.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVKPuw4CrrG1xCt_nNKQkjW_yXeKvZQorfLJ1gfC-jwSjEBnq6rBDQXPjAl-e9HDn2O33u10Lgy_hWsKy79qbfCr2xDREarmpxi-BvhPCAoMFL_ZUM_bbuwCJ4OTVtJKG9W-oD4RH48vY/s1600/Chenmistry+basic+Pg4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVKPuw4CrrG1xCt_nNKQkjW_yXeKvZQorfLJ1gfC-jwSjEBnq6rBDQXPjAl-e9HDn2O33u10Lgy_hWsKy79qbfCr2xDREarmpxi-BvhPCAoMFL_ZUM_bbuwCJ4OTVtJKG9W-oD4RH48vY/s1600/Chenmistry+basic+Pg4.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinmd6WBSScGy7qNUqOuHCgsmwr2lqsxPeSDrxGXpXROKMZflRXmCdUVEy-k4CLTMYGZ4GuSy_o7Gwb9HohaHsIQghXYe3DvSf4HaJUTF_ydV6s2IV-aJSXPU5-2-VHMlHsUGHgdr0NSK0/s1600/Chenmistry+basic+Pg5.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinmd6WBSScGy7qNUqOuHCgsmwr2lqsxPeSDrxGXpXROKMZflRXmCdUVEy-k4CLTMYGZ4GuSy_o7Gwb9HohaHsIQghXYe3DvSf4HaJUTF_ydV6s2IV-aJSXPU5-2-VHMlHsUGHgdr0NSK0/s1600/Chenmistry+basic+Pg5.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOWcUwX0U8aSW2kYXZyWWOOUJBoxgmfyWLUMuaOL1_psWgOPEjoqPVEjFAE01CSXaGlwOAeotTSaArGjRsC_W2sUCt5Vmgh4VmE3GdAkh7d7M4O353ILZg29JnomnNP0MEc6lV_B9-wyA/s1600/Chenmistry+basic+Pg6.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOWcUwX0U8aSW2kYXZyWWOOUJBoxgmfyWLUMuaOL1_psWgOPEjoqPVEjFAE01CSXaGlwOAeotTSaArGjRsC_W2sUCt5Vmgh4VmE3GdAkh7d7M4O353ILZg29JnomnNP0MEc6lV_B9-wyA/s1600/Chenmistry+basic+Pg6.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUj6a8cXnG2n8_dpdQJtZxHxP-TngtzziWWzblefdgzNWxgLwj7qGM4Ncv5MfC1NnSoYwcXDQX2hrE7Wg3qNMQWnuXqMX7-akhNX8bkVFQPcnaFS3Sf_pSCj5gOnD5tUndmjWBObhyphenhyphenMk4/s1600/Chenmistry+basic+Pg7.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUj6a8cXnG2n8_dpdQJtZxHxP-TngtzziWWzblefdgzNWxgLwj7qGM4Ncv5MfC1NnSoYwcXDQX2hrE7Wg3qNMQWnuXqMX7-akhNX8bkVFQPcnaFS3Sf_pSCj5gOnD5tUndmjWBObhyphenhyphenMk4/s1600/Chenmistry+basic+Pg7.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVsbJJFbRH4APKuMKWKA6LjhFXK8g-U4qSeL6ogpWcyBQo4AVebsupmsEijKGvxFNPyRRoZHRsdxhxhUNn8augeaqDdp52X1wLy3RIVU73UC9OlzPiprUBPun77qFbJBLidVx-Xosnj08/s1600/Chenmistry+basic+Pg8.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVsbJJFbRH4APKuMKWKA6LjhFXK8g-U4qSeL6ogpWcyBQo4AVebsupmsEijKGvxFNPyRRoZHRsdxhxhUNn8augeaqDdp52X1wLy3RIVU73UC9OlzPiprUBPun77qFbJBLidVx-Xosnj08/s1600/Chenmistry+basic+Pg8.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Note :--&amp;gt;&amp;gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13; font-size: large;&quot;&gt;&lt;b style=&quot;background-color: red;&quot;&gt;Request from all the teachers of entire universe&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Please teach students by providing them real life examples in their local language so that they can understand much better &amp;amp; use the knowledge in their daily life (helping their friends, relatives,&amp;nbsp;neighbors&amp;nbsp;etc).&lt;/li&gt;
&lt;li&gt;Please make classroom atmosphere friendly &amp;amp; fearless so that students can express their feelings, understand topic much better, &amp;amp; most important ask any Questions without any kind of hesitation.&lt;/li&gt;
&lt;li&gt;Always remember, what you do with student, they may follow you &amp;amp; make future world the way you are as everyone know &lt;b&gt;&lt;u&gt;students are the future of any world.&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;I hope above information would be helpful.&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/3646230980193487024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2011/01/besic-chemistry-syllabus-upto-10th.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/3646230980193487024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/3646230980193487024'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2011/01/besic-chemistry-syllabus-upto-10th.html' title='Basic Chemistry Syllabus upto 10th Standard Students'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-yYryFloVd_doGNpt3ngXTKLDM4JF-lW444cCbe9Adv8MG-0cxiLcm2SzUcxPZhQLN_o4vz3WMq769xK-xKjWDO3OKP2C1lG0MiS_7rS_E0k1q_Rqj2WpgdbSTEgqQjgyN5I2nJEs26M/s72-c/Chenmistry+basic+Pg1.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-560739936387061098</id><published>2011-01-11T01:40:00.000-08:00</published><updated>2011-01-11T01:41:27.929-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Anniversary alert"/><category scheme="http://www.blogger.com/atom/ns#" term="Birthday alert"/><category scheme="http://www.blogger.com/atom/ns#" term="get Birthday and Anniversary Alert"/><category scheme="http://www.blogger.com/atom/ns#" term="How to get list of clients from Database whose Birthday or Anniversary would come within the next few days"/><title type='text'>How to make SQL Query to get Birthday &amp; Anniversary Alert</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-large;&quot;&gt;&lt;b&gt;RAM RAM Friends&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;How to get list of clients from Database whose Birthday or Anniversary would come within the next few days&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
When I got this problem, first I thought it would be normal &amp;amp; not tough.&lt;br /&gt;
But when I start working on it, I found it very very difficult &amp;amp; like anyone else I tried to find its solution on the Internet using Google etc, but after searching a lot for few days, I feel very upset as I didn&#39;t get the correct solution neither the hint to solve it.&lt;br /&gt;
But after getting tired from net, I never gave up &amp;amp; decided to solve this problem by my own way,&lt;br /&gt;
so after a lot of hard work I found the way &amp;amp; moreover when writing this blog, I also found other ways to make the whole procedure very simple.&lt;br /&gt;
&lt;br /&gt;
Below is the summary of the whole procedure which I implemented in the project&lt;br /&gt;
&lt;br /&gt;
Note: Please note that whole procedure is written in VB6.0 &amp;nbsp;&amp;amp; MS SQL Server 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Dim S As String, IsShow As Boolean&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Dim UserDays As Integer&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Dim AlertDt As Date, CurrentDt As Date, CurrentNextYrDt As Date&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CurrentDt = Format$(Now, &quot;DD/MMM/YYYY&quot;)&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;UserDays = Val(IIf(IsNull(GDREC!settingvalue) = False, GDREC!settingvalue, &quot;0&quot;))&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AlertDt = CurrentDt + UserDays&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CurrentNextYrDt = DateAdd(&quot;yyyy&quot;, 1, CurrentDt)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Note: In below SQL Query,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;All capital words are Keywords of SQL Server&lt;/li&gt;
&lt;li&gt;CurrentDt=&quot;26Oct2010&quot;&lt;/li&gt;
&lt;li&gt;AlertDt=&quot;01Mar2011&quot; &amp;nbsp;, &amp;nbsp;(UserDays =&quot;01Mar2011&quot; -&amp;nbsp;&quot;26Oct2010&quot;)&lt;/li&gt;
&lt;li&gt;CurrentNextYrDt=&quot;26Oct2011&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;SELECT &amp;nbsp;Bday,ClientId,ClientName,Phone,Mobile,AlterBDay&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;FROM (SELECT Bday,ClientId,ClientName,Phone,Mobile,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CASE WHEN MONTH(BDay) &amp;lt; MONTH(GETDATE()) THEN&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATEADD(YEAR,DATEDIFF(YEAR,BDay,&#39;26Oct2011&#39;),BDay)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Else&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DATEADD(YEAR,DATEDIFF(YEAR,BDay,&#39;26Oct2010&#39;),BDay)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END As AlterBDay&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM ClientMaster WHERE BDay IS NOT NULL AND NOT(BDay=&#39;01Jan1900&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;) AS NewClientMaster&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE AlterBDay BETWEEN &#39;26Oct2010&#39; AND &#39;01Mar2011&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;ORDER BY AlterBDay&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Explanation of above Query:&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Here I have used one kind of Nested query with Case, When Else End As clause&lt;/li&gt;
&lt;li&gt;Here I used nested query to return a table (view) from which main query extract desired data&lt;/li&gt;
&lt;li&gt;In the nested query, I created one new column&amp;nbsp;&quot;&lt;b&gt;AlterBDay&lt;/b&gt;&quot;&amp;nbsp;which use value of &amp;nbsp;&lt;b&gt;BDay&lt;/b&gt; (Birthday) column &amp;amp; &amp;nbsp;have modified date by making year part to either current year or next year of &lt;b&gt;BDay&lt;/b&gt; column according to AlertDt (&quot;01Mar2011&quot;) value.&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;After studying &amp;amp; understanding the above query &amp;amp; you would certainly get lot of ideas to make this query more short &amp;amp; also easy to understand, as I think, this query would be more easy if you use/create Views instead of nested query.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Below is the use of above query in VB6 project&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;by passing the whole query in the string variable named &quot;S&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = &quot; SELECT Bday,ClientId,ClientName,Addr1,Phone,Mobile,AlterBDay &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = S &amp;amp; &quot; FROM (SELECT Bday,ClientId,ClientName,Addr1,Phone,Mobile, &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = S &amp;amp; &quot; CASE WHEN MONTH(BDay) &amp;lt; MONTH(GETDATE()) THEN &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = S &amp;amp; &quot; DATEADD(YEAR,DATEDIFF(YEAR,BDay,&#39;&quot; &amp;amp; Format$(CurrentNextYrDt, &quot;DD/MMM/YYYY&quot;) &amp;amp; &quot;&#39;),BDay) &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = S &amp;amp; &quot; Else &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = S &amp;amp; &quot; DATEADD(YEAR,DATEDIFF(YEAR,BDay,&#39;&quot; &amp;amp; Format$(CurrentDt, &quot;DD/MMM/YYYY&quot;) &amp;amp; &quot;&#39;),BDay) &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = S &amp;amp; &quot; END As AlterBDay &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = S &amp;amp; &quot; FROM ClientMaster WHERE BDay IS NOT NULL AND NOT(BDay=&#39;01Jan1900&#39;) &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = S &amp;amp; &quot; ) AS NewClientMaster WHERE AlterBDay BETWEEN &#39;&quot; &amp;amp; Format$(CurrentDt, &quot;DD/MMM/YYYY&quot;) &amp;amp; &quot;&#39; AND &#39;&quot; &amp;amp; Format$(AlertDt, &quot;DD/MMM/YYYY&quot;) &amp;amp; &quot;&#39; &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = S &amp;amp; &quot; ORDER BY AlterBDay &quot;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I hope this query would help you a lot in case you get this kind of problem.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Happy Programming.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I uses programming as a way to help people to make their life more comfortable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/560739936387061098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2011/01/how-to-make-sql-query-to-get-birthday.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/560739936387061098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/560739936387061098'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2011/01/how-to-make-sql-query-to-get-birthday.html' title='How to make SQL Query to get Birthday &amp; Anniversary Alert'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-6188115569104108526</id><published>2011-01-07T23:42:00.000-08:00</published><updated>2011-04-23T00:45:24.747-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basic English Course Syllabus to read"/><category scheme="http://www.blogger.com/atom/ns#" term="General English Syllabus"/><category scheme="http://www.blogger.com/atom/ns#" term="How to quickly learn English as beginner"/><category scheme="http://www.blogger.com/atom/ns#" term="understand English"/><category scheme="http://www.blogger.com/atom/ns#" term="write"/><title type='text'>Basic English Course Syllabus to read, write &amp; understand English</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;RAM RAM Friends&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Friends during my struggle days, I used to be a private tutor. As I live in town area, where most of the students of poor or middle class families who mostly study in Government schools, face lots of difficulty while&amp;nbsp;studying&amp;nbsp;English. When I got chance to teach them English, I have to teach them very basic things in English to make their base in the language. For this I have to teach the same topics to various students in different batches.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;I had to remember all the topics &amp;amp; write them again &amp;amp; again. To overcome this problem I made&amp;nbsp;Basic English Course Syllabus &amp;amp; then start teaching them according to that, this make me much comfortable &amp;amp; it would be very good for them to make quick revision &amp;amp; also help their friends &amp;amp; relative to learn it.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;So keeping in mind these benefits, I decide to provide it online so that everyone in the world who want to learn English Language, would be benefited from it.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Please note that it is just a Syllabus.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Following are the various topics&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h2&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;u&gt;Basic Formula for making Simple Sentence&lt;/u&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/h2&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: Verdana; font-size: small;&quot;&gt;&lt;b&gt;Sub+HV+MV+Ob+Ad+.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;where&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;Sub--&amp;gt;Subject (Who)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;HV --&amp;gt;Helping Verb&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;Ob---&amp;gt;Object&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a. Living (Whom)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b. Non Living (What)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;Ad----&amp;gt;Adverb/Adjective&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Where&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;When&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;How&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Why&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Following are very basic terms&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; style=&quot;text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana; font-weight: normal;&quot;&gt;&lt;b&gt;Subject&lt;/b&gt;&lt;/span&gt;&lt;/th&gt; &lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana; font-weight: normal;&quot;&gt;&lt;b&gt;Adv&lt;/b&gt;&lt;/span&gt;&lt;/th&gt; &lt;th&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana; font-weight: normal;&quot;&gt;&lt;b&gt;Object&lt;/b&gt;&lt;/span&gt;&lt;/th&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;I &amp;nbsp;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;&amp;nbsp;My&amp;nbsp;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Me&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;We&amp;nbsp;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Our&amp;nbsp;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Us&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #eeeeee;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #eeeeee;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #eeeeee;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;You&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Your&amp;nbsp;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;&amp;nbsp;You&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;He&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;His &amp;nbsp;&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Him&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;She&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Her&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Her&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;They&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Their&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Them&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;It&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Its&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;It&lt;/span&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;&lt;u&gt;Below In More details&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; style=&quot;text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;I&lt;/td&gt; &lt;td&gt;My&lt;/td&gt; &lt;td&gt;Mine&lt;/td&gt; &lt;td&gt;Me&lt;/td&gt; &lt;td&gt;Myself&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;We&lt;/td&gt; &lt;td&gt;Our&lt;/td&gt; &lt;td&gt;Ours&lt;/td&gt; &lt;td&gt;Us&lt;/td&gt; &lt;td&gt;Ourselves&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;You&lt;/td&gt; &lt;td&gt;Your&lt;/td&gt; &lt;td&gt;Yours&lt;/td&gt; &lt;td&gt;You&lt;/td&gt; &lt;td&gt;Yourself/Yourselves&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;He&lt;/td&gt; &lt;td&gt;His&lt;/td&gt; &lt;td&gt;His&lt;/td&gt; &lt;td&gt;Him&lt;/td&gt; &lt;td&gt;Himself&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;She&lt;/td&gt; &lt;td&gt;Her&lt;/td&gt; &lt;td&gt;Hers&lt;/td&gt; &lt;td&gt;Her&lt;/td&gt; &lt;td&gt;Herself&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;They&lt;/td&gt; &lt;td&gt;Their&lt;/td&gt; &lt;td&gt;Theirs&lt;/td&gt; &lt;td&gt;Them&lt;/td&gt; &lt;td&gt;Themselves&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;It &lt;/td&gt; &lt;td&gt;Its &lt;/td&gt; &lt;td&gt;Its&lt;/td&gt; &lt;td&gt;It&lt;/td&gt;&lt;td&gt;Itself&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Some more Important Daily use Subjects etc&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;This&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;That&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;These&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Those&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Difference between &lt;b&gt;Singular&lt;/b&gt; &amp;amp; &lt;b&gt;Plural&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Difference between &lt;b&gt;A&lt;/b&gt; &amp;amp; &lt;b&gt;An&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Various &lt;b&gt;Important Helping verbs&lt;/b&gt; (Most frequently used)&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Is&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Am&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Are&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Was&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Were&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Will be&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Shall be&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Will&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Shall&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Has&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Have&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Had&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Will have&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Shall have&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Is to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Am to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Are to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Was to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Were to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Has to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Have to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Had to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Will have to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Shall have to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;&lt;u&gt;Modals&lt;/u&gt;&lt;/b&gt; (Special Helping Verbs)&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Can&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Could&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;May&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Might&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Should&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Ought to&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Need&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Dare&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Will&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Shall&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Would&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Must&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Some Important Sentence building words&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;It&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;There&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Let&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Would that ____ were____&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Types of Sentences&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Simple/Affirmative Sentences&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Negative Sentences&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Interrogative Sentences&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Interrogative Sentences without &lt;b&gt;wh-&lt;/b&gt;family&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Interrogative Sentences with &lt;b&gt;wh&lt;/b&gt;-family&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Without Object&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;With Object&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Interrogative Negative Sentences&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Without wh-family&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;With wh-family&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;without object&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;with object&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Imperative Sentences&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Wh-Family words&lt;/b&gt; &amp;nbsp;(Most common are below)&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Who&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;What&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;How&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Where&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;When&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Why&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Whose&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Whom&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Which&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;How many&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;How much&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;How old&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;How far&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;How long&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;From where&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;To whom&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;In which&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Various useful words&lt;/b&gt; (whose meaning one should know)&lt;/span&gt;&lt;/li&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; style=&quot;width: 600px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;So&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;This is because&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Thus&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Hence&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Therefore&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;That is why&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;But&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;However&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Since&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;As&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;When&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Moreover&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Whatever&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Thereafter&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Whatsoever&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Because&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;While&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Whereas&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Which&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Who&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;That&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Already&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;After&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Before&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Just&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;For&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Of&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;In&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Into&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;On&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Onto&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;From&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;With&lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Without&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Once&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Ago&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;According to&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Opinion&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Latest&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;At least&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;At last&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Eventually&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Fortunately&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Unfortunately&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Till&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Until&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Etc.&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;E.g.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;i.e.&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;So on&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;In case of&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Like&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Between&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Among&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;Each other&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;One another&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;as well as&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;if --- else&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;otherwise&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;instead of&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;rather&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;either--or&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;neither--nor&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;although--yet&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;although----,&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;on the other hand&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;is called&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;is known as&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;only&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;due to&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;one of the most---&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;if ---- then&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;if ---- ,&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;in order to&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;as a result&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Verdana;&quot;&gt;if&lt;/span&gt;&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;b&gt;Now do following after learning all above&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Tense chart&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Tenses&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Voices (Active voice &amp;amp; Passive voice)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Narration ( Direct &amp;amp; Indirect sentences)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Non-Finite&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;Complete any translation book&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;I hope it would be helpful for the persons who want to learn &lt;b&gt;English&lt;/b&gt;&amp;nbsp;language &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;h2&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/6188115569104108526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2011/01/basic-english-course-syllabus-to-read.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/6188115569104108526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/6188115569104108526'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2011/01/basic-english-course-syllabus-to-read.html' title='Basic English Course Syllabus to read, write &amp; understand English'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-8187025878509706578</id><published>2011-01-03T16:01:00.000-08:00</published><updated>2011-01-03T02:31:38.565-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Email and VB"/><category scheme="http://www.blogger.com/atom/ns#" term="Email and Visual Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Email from VB"/><category scheme="http://www.blogger.com/atom/ns#" term="Email from VB6.0"/><category scheme="http://www.blogger.com/atom/ns#" term="Email from Visual Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="Email via VB"/><category scheme="http://www.blogger.com/atom/ns#" term="How to send E-Mail from VB6.0 via Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Send  email from VB"/><category scheme="http://www.blogger.com/atom/ns#" term="VB and  Email"/><title type='text'>How to send E-Mail from VB 6.0 via Internet</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-size: x-large;&quot;&gt;RAM RAM Friends&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;How to send E-Mail from VB 6.0 via Internet&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
When I got this work to implement in our project, first I got very excited but when I tried to search this topic on Internet via Google etc, I had to struggle a lot to find the correct method.&lt;br /&gt;
&lt;br /&gt;
Here I would try to explain HOW TO SEND &lt;b&gt;EMAIL&lt;/b&gt; FROM VB via INTERNET&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Below is a very simple program to explain this&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5CCnjzcjaL15qT8lj9KKFUC0kVZiAQw0-IdE2-g64lIy8jZ3EMtp6yCozmhCV2kPIllTQ1WFMQY0VSNLK6xqBu5BA451VumonVRy-mskIwGx4LlXRY9DpDxczmX0Nqvs8OTfkZI5q-RA/s1600/EMail+Setting+Image.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5CCnjzcjaL15qT8lj9KKFUC0kVZiAQw0-IdE2-g64lIy8jZ3EMtp6yCozmhCV2kPIllTQ1WFMQY0VSNLK6xqBu5BA451VumonVRy-mskIwGx4LlXRY9DpDxczmX0Nqvs8OTfkZI5q-RA/s1600/EMail+Setting+Image.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;Private Sub cmdSend_Click()&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;On Error GoTo ArunKakkarErr&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Dim iMsg As Object&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Dim iConf As Object&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Dim Flds As Variant&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Set iMsg = CreateObject(&quot;CDO.Message&quot;)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Set iConf = CreateObject(&quot;CDO.Configuration&quot;)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;iConf.Load -1 &#39; CDO Source Defaults&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Set Flds = iConf.Fields&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Dim Schemas As String&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#39;Schemas = &quot;http://schemas.Microsoft.Com/cdo/configuration/&quot; &#39;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;causing error as it is very case sensitive&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Schemas = &quot;http://schemas.microsoft.com/cdo/configuration/&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;With Flds&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Item(Schemas &amp;amp; &quot;smtpusessl&quot;) = 1 &#39;True&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Item(Schemas &amp;amp; &quot;smtpauthenticate&quot;) = 1&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Item(Schemas &amp;amp; &quot;sendusername&quot;) = Trim(Me.txtMailId.Text) &#39;&quot;yourmail@gmail.Com&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Item(Schemas &amp;amp; &quot;sendpassword&quot;) = Trim(Me.txtPwd.Text) &#39;&quot;yourpassword&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Item(Schemas &amp;amp; &quot;smtpserver&quot;) = Trim(Me.txtSMPT.Text) &#39;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&quot;smtp.Gmail.Com&quot; it causes error as it is case sensitive, use &quot;smtp.gmail.com&quot;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Item(Schemas &amp;amp; &quot;sendusing&quot;) = 2&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Item(Schemas &amp;amp; &quot;smtpserverport&quot;) = 25 &#39;465&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Update&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;End With&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;strBody = Trim(Me.txtBody.Text) &amp;amp; vbCrLf &amp;amp; Now &amp;nbsp;&#39;&quot;Sample message &quot; &amp;amp; Time&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;With iMsg&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set .Configuration = iConf&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.To = Trim(Me.txtTo.Text) &#39;sendto&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.CC = Trim(Me.txtCC.Text) &#39;&quot;&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.BCC = Trim(Me.txtBCC.Text) &#39;&quot;&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; Note: The reply address is not working if you use this Gmail example&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39; It will use your Gmail address automatic. But you can add this line&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39; to change the reply address .ReplyTo = &quot;Reply@something.Com&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.From = Trim(Me.txtFrom.Text) &#39;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&quot;&lt;mail @gmail.com=&quot;&quot; as=&quot;&quot; be=&quot;&quot; displayed=&quot;&quot; to=&quot;&quot;&gt;&quot;&lt;/mail&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Subject = Trim(Me.txtSubject.Text) &#39;&quot;subject&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.TextBody = strBody&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.AddAttachment Trim(Me.txtAttachment.Text)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.AddAttachment Trim(Me.txtAttachment2.Text)&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Send&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;End With&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MsgBox (&quot;Mail has been sent successfully, Please check the mail if you have any doubt.&quot;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Exit Sub&lt;/div&gt;&lt;div&gt;ArunKakkarErr:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MsgBox &quot;There is an error while sending mail. And details are =&quot; &amp;amp; Err.Description&lt;/div&gt;&lt;div&gt;End Sub&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Important Notes:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Please Allow this program to access Internet in your Firewall setting or Antivirus program if they ask for it else you can&#39;t send the email.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Your program may take time while sending email so make proper coding in your program so that user may know that your program is busy. ( e.g &amp;nbsp;by changing your mouse pointer etc)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Please take the commented notes given in above code very seriously to get proper result.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;Good luck for programming.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/8187025878509706578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2011/01/how-to-send-e-mail-from-vb-60-via.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/8187025878509706578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/8187025878509706578'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2011/01/how-to-send-e-mail-from-vb-60-via.html' title='How to send E-Mail from VB 6.0 via Internet'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5CCnjzcjaL15qT8lj9KKFUC0kVZiAQw0-IdE2-g64lIy8jZ3EMtp6yCozmhCV2kPIllTQ1WFMQY0VSNLK6xqBu5BA451VumonVRy-mskIwGx4LlXRY9DpDxczmX0Nqvs8OTfkZI5q-RA/s72-c/EMail+Setting+Image.JPG" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-7571531405293238371</id><published>2011-01-03T01:52:00.000-08:00</published><updated>2017-07-14T07:34:17.694-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="How to send SMS from VB"/><category scheme="http://www.blogger.com/atom/ns#" term="How to send SMS from VB 6.0 via Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Send SMS from VB"/><category scheme="http://www.blogger.com/atom/ns#" term="Send SMS from VB6.0"/><category scheme="http://www.blogger.com/atom/ns#" term="Send SMS from Visual Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="SMS via VB"/><category scheme="http://www.blogger.com/atom/ns#" term="SMS via VB6.0"/><category scheme="http://www.blogger.com/atom/ns#" term="SMS via Visual Basic"/><title type='text'>How to send SMS from VB 6.0 via Internet</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;rupee foradian&amp;quot;; font-size: 12pt;&quot;&gt;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;
&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: magenta;&quot;&gt;RAM RAM Friends&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;
At last I got time to write one of important topic here.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;
How to send SMS from VB6.0 via Internet&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;
When I got this work to implement in our project, first I got very excited but when I tried to search this topic on Internet via Google etc, I had to struggle a lot to find the correct method.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;
Well We can send SMS from VB6.0 by two ways&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;By using Internet (this method is explained Here )&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;By Using Mobile Phone (Not explained here)&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;After long time, I finally got chance to provide download link to demo project which is below&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;The downloaded file is rar compressed. In case you don&#39;t have software to extract it, just download wrar320 or higher version free of cost from the internet via Google etc.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;
&lt;b style=&quot;background-color: yellow;&quot;&gt;Please note: You need some valid Developer API.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;
&lt;b style=&quot;background-color: yellow;&quot;&gt;Please either contact company or create an demo account to get developer API from the site, I had mentioned Below.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial,sans-serif;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;a href=&quot;http://www.budgethospitality.in/Arun%20Kakkar/Demos/Arun%20Kakkar%20SMS%20Demo.rar&quot; rel=&quot;nofollow&quot; style=&quot;text-align: left;&quot; target=&quot;_blank&quot;&gt;Click here to Download SMS Demo project&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;a href=&quot;http://www.budgethospitality.in/Arun%20Kakkar/Demos/ArunKakkar%20SMS%20Demo%20Setup.rar&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;click here to Download SMS Demo project Setup without code 2.67mb &lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;
Here I would try to explain HOW TO SEND SMS FROM VB via INTERNET&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;The very first thing is that U need to contact to any SMS Providers (e.g. in India some are&lt;/li&gt;
&lt;ol&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://www.mysmsmantra.com/&quot;&gt;http://www.mysmsmantra.com/&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://www.smscountry.com/&quot;&gt;http://www.smscountry.com/&lt;/a&gt; (click on Register now button at top)&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://www.freesmsapi.com/&quot;&gt;http://www.freesmsapi.com/&lt;/a&gt; (click on Sign Up button at top) &lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://mirchsms.com/bulk_sms.html&quot;&gt;http://mirchsms.com/bulk_sms.html&lt;/a&gt; (please contact at no. provided at top or email at bottom to request to get trial sms api ). I also tested it very well, you may also refer my name to them.)&lt;/li&gt;
&lt;/ol&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Now get the &lt;b&gt;&lt;u&gt;Developer API&lt;/u&gt;&lt;/b&gt; from these SMS Providers either by purchasing account or if you want to test before purchasing then you can ask these SMS Providers to provide you a free trial account so that you can test their service)&amp;nbsp;&lt;/li&gt;
&lt;ol&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Below is one of the example of Developer API&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&#39;http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=demouser&amp;amp;password=399501089&amp;amp;sendername=DM&amp;amp;mobileno=919999999999&amp;amp;message=Hello&quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Now just use the following code in your VB program to send SMS&lt;/li&gt;
&lt;ol&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Dim WinHttpReq As Object&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;Dim sResult As String, strURL As String&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Set WinHttpReq = CreateObject(&quot;Msxml2.XMLHTTP&quot;)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;strURL=&quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=demouser&amp;amp;password=399501089&amp;amp;sendername=DM&amp;amp;mobileno=919999999999&amp;amp;message=Hello&lt;/span&gt;&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: lime;&quot;&gt;&#39;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Replace the Message &amp;amp; MobileNo with the no to whom you want to send SMS&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;With WinHttpReq&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp;.Open &quot;GET&quot;, strURL, False&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;.Send&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;sResult = .responseText&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&amp;nbsp;End With&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;MsgBox &quot;Status of Sent SMS &amp;nbsp;is=&quot; &amp;amp; sResult&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Some Important notes We should keep in mind while Sending SMS&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Check the Maximum Message Length that you can send as allowed by your SMS Service Providers&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Check whether you have to make your Message encode according to WWW standards, confirm it from your SMS Providers&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;color: orange;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;While sending data over internet/network, some letters can not be sent as it is, they need to be converted to send them to internet. e.g &quot;&lt;/span&gt; &amp;amp;&quot;&amp;nbsp; can not be send as it, it needs to be converted to send it over internet.&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;color: orange;&quot;&gt;URL encoding converts characters into a format that can be transmitted over the Internet.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;For more information see following link&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;http://www.w3schools.com/html/html_urlencode.asp&quot; style=&quot;color: red;&quot;&gt;http://www.w3schools.com/html/html_urlencode.asp&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Always Allow the access of your program to get connected with Internet which would be asked by the Firewall of your OS or Antivirus program else you could not send SMS&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;As sending SMS may take time, you should do appropriate changes in your program to show user that your program is busy in sending SMS like change Mouse Pointer Shape from normal to HourGlass &amp;amp; after sending make it normal.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;After long time, I finally got chance to provide download link to demo project which is below&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: yellow; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;The downloaded file is rar compressed. In case you don&#39;t have software to extract it, just download wrar320 or higher version free of cost from the internet via Google etc.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;
&lt;b style=&quot;background-color: yellow;&quot;&gt;Please note: You need some valid Developer API.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;
&lt;b style=&quot;background-color: yellow;&quot;&gt;Please either contact company or create an demo account to get developer API from the site, I had mentioned above.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial,sans-serif;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;a href=&quot;http://www.budgethospitality.in/Arun%20Kakkar/Demos/Arun%20Kakkar%20SMS%20Demo.rar&quot; rel=&quot;nofollow&quot; style=&quot;background-color: yellow; text-align: left;&quot; target=&quot;_blank&quot;&gt;click here to Download SMS Demo project&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Below is a sample which I used in my project&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR-Yz5EKPhB6Ty1NJruSkEIKTQcwJFVBfrQz-AsKlV3rhiFAVTrOqyLSOXSoNXtI8ROw2aKOtVpS6igm0H67-qgcEvy5WJ4_zi4KnbClxO4ytglPMfAvXur4TSr0iGWm2mmmBgLWbM9d0/s1600/SMS+Setting+Image.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR-Yz5EKPhB6Ty1NJruSkEIKTQcwJFVBfrQz-AsKlV3rhiFAVTrOqyLSOXSoNXtI8ROw2aKOtVpS6igm0H67-qgcEvy5WJ4_zi4KnbClxO4ytglPMfAvXur4TSr0iGWm2mmmBgLWbM9d0/s1600/SMS+Setting+Image.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYoJ8A3cUcE6u0grUkk_mpnb5Jp7cduVtgx2PsZanCisfZS6KY_yvNZOsUrwsPFJeQfr7b95umSqPWb6rMID7y3Fkp6nADepVU-iPLQJ3On1VSAT6tWJegd8IdUvFRAmXpzF0CCcjQlQ8/s1600/SMS+help+image.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYoJ8A3cUcE6u0grUkk_mpnb5Jp7cduVtgx2PsZanCisfZS6KY_yvNZOsUrwsPFJeQfr7b95umSqPWb6rMID7y3Fkp6nADepVU-iPLQJ3On1VSAT6tWJegd8IdUvFRAmXpzF0CCcjQlQ8/s1600/SMS+help+image.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;Private Sub cmdSMSTest_Click()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#39;validate information&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp;&#39;Message(max 160 Chars)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Me.MousePointer = 11 &#39;Hourglass&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Call &lt;b&gt;SendMySMS(&lt;/b&gt;myMob, myMsg, True, Trim(Me.txtSMSDeveloperAPI), &amp;nbsp;Trim(Me.txtSMSMobileText), Trim(Me.txtSMSMsgText)&lt;b&gt;)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Me.MousePointer = 0 &#39;Default&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;End Sub&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;Public Function SendMySMS(ByVal myMob As String, ByVal myMsg As String, Optional ByVal IsTest As Boolean = False, Optional ByVal UserDeveloperAPI As String = &quot;&quot;, Optional ByVal MobText As String = &quot;&quot;, Optional ByVal MsgText As String = &quot;&quot;, Optional ByVal AskToSend As Boolean = True, Optional ByVal ShowStatus As Boolean = True) As Boolean&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&#39;Here you write your code&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Following is the sample code to test it--- but of course you need Developer API to use the code&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Private Sub cmdSMSTest_Click()&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;validate information&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;Message(max 160 Chars)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; If Me.chkSMSActivateService.Value = 0 Or Len(Me.txtSMSDeveloperAPI) &amp;lt; 1 Or Len(Me.txtSMSMobileText) &amp;lt; 1 Or Len(Me.txtSMSMessageText) &amp;lt; 1 Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MsgBox &quot;Please enter all setting values&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Me.txtSMSDeveloperAPI.SetFocus&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Exit Sub&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim s As String&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim myMob As String&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim myMsg As String&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; s = &quot;Enter Mobile nos separated by , then put @ now write your msg not more than 160 chars&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; s = s &amp;amp; vbCrLf &amp;amp; &quot;e.g 9971745868,9811994797@Hi this is test sms by ABM Infotech&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; s = InputBox(s, , &quot;9971745868,9811360935@Hi this is test sms by ABM Infotech&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myMsg = Mid(s, InStr(1, s, &quot;@&quot;, vbTextCompare) + 1)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; If Len(myMsg) &amp;gt; 155 Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myMsg = Left$(myMsg, 155)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &amp;nbsp; myMob = Mid(s, 1, InStr(1, s, &quot;@&quot;, vbTextCompare) - 1)&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; Me.MousePointer = 11 &#39;Hourglass&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Call SendMySMS(myMob, myMsg, True, Trim(Me.txtSMSDeveloperAPI), Trim(Me.txtSMSMobileText), Trim(Me.txtSMSMessageText))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Me.MousePointer = 0 &#39;Default&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Public Sub SendMySMS(ByVal myMob As String, ByVal myMsg As String, Optional ByVal IsTest As &lt;/span&gt;Boolean = False, Optional ByVal UserDeveloperAPI As String = &quot;&quot;, Optional ByVal MobText As String = &quot;&quot;, Optional ByVal MsgText As String = &quot;&quot;, Optional ByVal AskToSend As Boolean = True, Optional ByVal ShowStatus As Boolean = True)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;myMob,myMsg, Optional IsTest,UserDeveloperAPI , MobText, MsgText,AskToSend ,ShowStatus As Boolean = True&lt;br /&gt;
&amp;nbsp; &amp;nbsp; On Error GoTo ArunKakkarErr&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim sMobText1 As String&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim sMobText2() As String&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim sMobText3() As String&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim sResult As String, strURL As String&lt;br /&gt;
&amp;nbsp; &amp;nbsp; strURL = &quot;&quot;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; If IsTest Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; Else &#39;retrieve settings from db&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;&#39;&#39;SMS_IsActivate &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1,0 SMS_DeveloperAPI SMS_MobileText SMS_MessageText&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If UserPreferencesGetValue(&quot;SMS_IsActivate&quot;, &quot;0&quot;) = &quot;0&quot; Then Exit Sub&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;UserDeveloperAPI = UserPreferencesGetValue(&quot;SMS_DeveloperAPI&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MobText = UserPreferencesGetValue(&quot;SMS_MobileText&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MsgText = UserPreferencesGetValue(&quot;SMS_MessageText&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;To put 91 etc for more than one mobile nos&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sMobText2 = Split(MobText, &quot;=&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sMobText1 = &quot;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; If UBound(sMobText2) &amp;gt; 0 Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sMobText1 = sMobText2(1) &#39;2nd element&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &amp;nbsp; If Len(sMobText1) &amp;gt; 0 Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sMobText3 = Split(myMob, &quot;,&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If UBound(sMobText3) &amp;gt; 0 Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myMob = &quot;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For i = LBound(sMobText3) To UBound(sMobText3)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If myMob = &quot;&quot; Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myMob = sMobText3(i) &#39;1st Mobile No&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myMob = myMob &amp;amp; &quot;,&quot; &amp;amp; sMobText1 &amp;amp; sMobText3(i) &#39;2nd, 3rd, 4th Mob No&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Next i&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; strURL = UserDeveloperAPI &amp;amp; &quot;&amp;amp;&quot; &amp;amp; MobText &amp;amp; myMob &amp;amp; &quot;&amp;amp;&quot; &amp;amp; MsgText &amp;amp; myMsg&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; If AskToSend Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If MsgBox(&quot;Do you want to send SMS?&quot;, vbYesNo + vbDefaultButton1) = vbNo Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Exit Sub&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim WinHttpReq As Object&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; Set WinHttpReq = CreateObject(&quot;Msxml2.XMLHTTP&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;strURL = &quot;http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=demouser&amp;amp;password=399501089&amp;amp;sendername=DM&amp;amp;mobileno=919999999999&amp;amp;message=Hello&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;Replace the Message &amp;amp; MobileNo with the no to whom you want to send SMS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; With WinHttpReq&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Open &quot;GET&quot;, strURL, False&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Send&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sResult = .responseText&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End With&lt;br /&gt;
&amp;nbsp; &amp;nbsp; If ShowStatus Then MsgBox &quot;Status of Sent SMS &amp;nbsp;is=&quot; &amp;amp; sResult&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; Exit Sub&lt;br /&gt;
ArunKakkarErr:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MsgBox (&quot;Sorry there is some error while sending sms&quot; &amp;amp; vbCrLf &amp;amp; Err.Description)&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
End Sub&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Public Function UserPreferencesGetValue(ByVal SettingName As String, Optional ByVal DefaultValue As &lt;/span&gt;String = &quot;&quot;, Optional ByVal myTable As String = &quot;UserPreferences&quot;, Optional ByVal NameCol As String = &quot;SettingName&quot;, Optional ByVal ValueCol As String = &quot;SettingValue&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim s As String&lt;br /&gt;
&amp;nbsp; &amp;nbsp; s = &quot;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim rptRs As New ADODB.Recordset&lt;br /&gt;
&amp;nbsp; &amp;nbsp; If rptRs.State Then rptRs.Close&lt;br /&gt;
&amp;nbsp; &amp;nbsp; rptRs.Open &quot;select * from &quot; &amp;amp; myTable &amp;amp; &quot; where &quot; &amp;amp; NameCol &amp;amp; &quot;=&#39;&quot; &amp;amp; SettingName &amp;amp; &quot;&#39;&quot;, Scon, adOpenStatic, adLockReadOnly&lt;br /&gt;
&amp;nbsp; &amp;nbsp; If rptRs.EOF = False Then &#39; &amp;nbsp;if already present then return&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s = IIf(IsNull(rptRs!SettingValue) = False, rptRs!SettingValue, DefaultValue)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Else &#39; if not present then return default&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s = DefaultValue&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
&amp;nbsp; &amp;nbsp; UserPreferencesGetValue = s&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Public Sub UserPreferencesSetValue(ByVal SettingName As String, ByVal SettingValue As String, Optional &lt;/span&gt;ByVal myTable As String = &quot;UserPreferences&quot;, Optional ByVal NameCol As String = &quot;SettingName&quot;, Optional ByVal ValueCol As String = &quot;SettingValue&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim rptRs As New ADODB.Recordset&lt;br /&gt;
&amp;nbsp; &amp;nbsp; If rptRs.State Then rptRs.Close&lt;br /&gt;
&amp;nbsp; &amp;nbsp; rptRs.Open &quot;select * from &quot; &amp;amp; myTable &amp;amp; &quot; where &quot; &amp;amp; NameCol &amp;amp; &quot;=&#39;&quot; &amp;amp; SettingName &amp;amp; &quot;&#39;&quot;, Scon, adOpenStatic, adLockReadOnly&lt;br /&gt;
&amp;nbsp; &amp;nbsp; If rptRs.EOF = False Then &#39; &amp;nbsp;if already present then update&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Scon.Execute &quot;Update &quot; &amp;amp; myTable &amp;amp; &quot; set &quot; &amp;amp; ValueCol &amp;amp; &quot; &amp;nbsp;= &#39;&quot; &amp;amp; SettingValue &amp;amp; &quot;&#39; where &quot; &amp;amp; NameCol &amp;amp; &quot; = &#39;&quot; &amp;amp; SettingName &amp;amp; &quot;&#39;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Else &#39; if not present then insert&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Scon.Execute &quot;Insert into &quot; &amp;amp; myTable &amp;amp; &quot; (&quot; &amp;amp; NameCol &amp;amp; &quot;,&quot; &amp;amp; ValueCol &amp;amp; &quot;) values (&#39;&quot; &amp;amp; SettingName &amp;amp; &quot;&#39;,&#39;&quot; &amp;amp; SettingValue &amp;amp; &quot;&#39;)&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End If&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Public Sub AKakkar_Error(Optional ByVal Source As String = &quot;&quot;)&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Dim s As String&lt;br /&gt;
&amp;nbsp; &amp;nbsp; s = &quot;Sorry for the inconvinence, There is some error&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; s = s &amp;amp; vbCrLf &amp;amp; &quot;ABM Source=&quot; &amp;amp; Source&lt;br /&gt;
&amp;nbsp; &amp;nbsp; s = s &amp;amp; vbCrLf &amp;amp; &quot;Error No=&quot; &amp;amp; Err.Number&lt;br /&gt;
&amp;nbsp; &amp;nbsp; s = s &amp;amp; vbCrLf &amp;amp; &quot;Error Description=&quot; &amp;amp; Err.Description&lt;br /&gt;
&amp;nbsp; &amp;nbsp; s = s &amp;amp; vbCrLf &amp;amp; &quot;Error Source=&quot; &amp;amp; Err.Source&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MsgBox s, vbCritical&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Note:::&amp;gt;&amp;gt;&amp;gt;&amp;gt; If someone need sample program, just mail me, I would like to help you.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now after learning it you can explore it in details to get more powerful options for your programs.&lt;br /&gt;
Best of Luck for Programming.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/7571531405293238371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2011/01/how-to-send-sms-from-vb-60-via-internet.html#comment-form' title='223 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/7571531405293238371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/7571531405293238371'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2011/01/how-to-send-sms-from-vb-60-via-internet.html' title='How to send SMS from VB 6.0 via Internet'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR-Yz5EKPhB6Ty1NJruSkEIKTQcwJFVBfrQz-AsKlV3rhiFAVTrOqyLSOXSoNXtI8ROw2aKOtVpS6igm0H67-qgcEvy5WJ4_zi4KnbClxO4ytglPMfAvXur4TSr0iGWm2mmmBgLWbM9d0/s72-c/SMS+Setting+Image.JPG" height="72" width="72"/><thr:total>223</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-2705808004808431275</id><published>2010-10-06T02:39:00.000-07:00</published><updated>2011-07-21T22:34:23.391-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Query Notes"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Query Quick Revision"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Query Revision"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Query Summary"/><category scheme="http://www.blogger.com/atom/ns#" term="Various SQL Query commands"/><title type='text'>Quickly Revise SQL used in many popular  RDBMS Databases</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&amp;nbsp;&amp;nbsp; RAM RAM Friends,&lt;br /&gt;
&lt;br /&gt;
I make following notes for &lt;b&gt;my personal revision&lt;/b&gt; of SQL Queries &amp;amp; when I got the &lt;b&gt;&lt;u&gt;chance to share&lt;/u&gt;&lt;/b&gt; these notes, I am posting them as it is without making major changes due to lack of time.&lt;br /&gt;
&lt;br /&gt;
Most of the content has been learnt from &lt;b&gt;W3School website&#39;s SQL tutorial&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;I hope it will help those who wish to make quick revision of sql.&lt;br /&gt;
&lt;br /&gt;
Please Note that I have build these notes to quickly revise SQL Query Syntax, commands etc Only.&lt;br /&gt;
&lt;br /&gt;
Since I used to learn syntax by learning/memorizing examples, so I have not mentioned any Syntax rather I use examples with only most used options for syntax.&lt;br /&gt;
MS SQL SERVER NOTES&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;1 SQL&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;stands for Structured Query Language&lt;/li&gt;
&lt;li&gt;is an ANSI (American National Standard Institute) standard&lt;/li&gt;
&lt;li&gt;standard language for accessing &amp;amp; manipulating db&lt;/li&gt;
&lt;li&gt;used in various db(RDBMS) like Access, (MS) SQL Server,Oracle, (IBM) DB2,&amp;nbsp;Sybase,MYSQL, etc&lt;/li&gt;
&lt;li&gt;it is not case sensitive&lt;/li&gt;
&lt;li&gt;&lt;b&gt;What can it do?&lt;/b&gt; it can create database,sp,tables,views,functions,triggers&lt;/li&gt;
&lt;li&gt;it can retrieve,insert,update,delete records from/in a db&lt;/li&gt;
&lt;li&gt;it can execute queries against a db&lt;/li&gt;
&lt;li&gt;it can set permissions on tables,sp,view&lt;/li&gt;
&lt;li&gt;Although SQL is an ANSI (American National Standards Institute) standard,&amp;nbsp;there are many different versions of the SQL language.However, to be compliant with the ANSI standard, they all support at least&amp;nbsp;the major commands (such as SELECT, UPDATE, DELETE, INSERT, WHERE) in a similar manner.&lt;/li&gt;
&lt;li&gt;Most of the SQL database programs also have their own proprietary extensions in addition to the SQL standard!&lt;/li&gt;
&lt;li&gt;Some DB systems require a semicolon at the end of each SQL stmnt, usually it is required by them&amp;nbsp;to allow more than one SQL stmnt to be executed in the same call to the server.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;it is divided into 2 parts DML &amp;amp; DDL&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&lt;u&gt;2 Website using SQL&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;We need following to build website using sql to access data&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;an RDBMS db program like MS Access,SQL Server, MYSQL etc&lt;/li&gt;
&lt;li&gt;a server-side scripting language like PHP, ASP&lt;/li&gt;
&lt;li&gt;SQL&lt;/li&gt;
&lt;li&gt;HTML/CSS&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;3 RDBMS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;R&lt;/b&gt;elational &lt;b&gt;D&lt;/b&gt;ata&lt;b&gt;B&lt;/b&gt;ase &lt;b&gt;M&lt;/b&gt;anagement &lt;b&gt;S&lt;/b&gt;ystem&lt;/li&gt;
&lt;li&gt;it is base for SQL &amp;amp; all modern db systems&lt;/li&gt;
&lt;li&gt;it has &lt;b&gt;data&lt;/b&gt;(&lt;i&gt;cell&lt;/i&gt;) &lt;b&gt;column&lt;/b&gt;,&lt;b&gt;row&lt;/b&gt;(&lt;i&gt;record&lt;/i&gt;),&lt;b&gt;table&lt;/b&gt;,&lt;b&gt;db&lt;/b&gt;,etc&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&lt;u&gt;4 DML&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;stands for Data Manipulation Language&lt;/li&gt;
&lt;li&gt;it is formed by &lt;b&gt;Query&lt;/b&gt; &amp;amp; &lt;b&gt;Update&lt;/b&gt; Commands&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;SELECT&lt;/b&gt; ---&amp;gt;extracts data from a db&lt;/li&gt;
&lt;li&gt;&lt;b&gt;UPDATE&lt;/b&gt;---&amp;gt;updates data in a db&lt;/li&gt;
&lt;li&gt;&lt;b&gt;DELETE&lt;/b&gt;---&amp;gt; deletes data from a db&lt;/li&gt;
&lt;li&gt;&lt;b&gt;INSERT INTO&lt;/b&gt;----&amp;gt;inserts new data into a db&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;5 DDL&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;stands for Data Definition Language&lt;/li&gt;
&lt;li&gt;it permits db tables to be created,deleted&lt;/li&gt;
&lt;li&gt;it also define indexes(keys),specify links b/w tables,&amp;amp; impose constraints b/w tables&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;DDL DDL DDL DDL  DDL DDL DDL DDL DDL DDL DDL DDL DDL DDL DDL DDL DDL &amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;e.g.&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;CREATE DATABASE&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;USE db1&lt;/li&gt;
&lt;li&gt;CREATE DATABASE  ---&amp;gt;creates a new db&lt;/li&gt;
&lt;li&gt;CREATE DATABASE db1&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;ALTER DATABASE&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;ALTER DATABASE--------&amp;gt;modifies a db&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;DROP DATABASE&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;used to delete the db&lt;/li&gt;
&lt;li&gt;DROP DATABASE db1&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;drop multiple dbs&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; DROP DATABASE db1,db2,db3,db4&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;CREATE TABLE&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE------------&amp;gt;creates a new table&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;P_Id int,&lt;/li&gt;
&lt;li&gt;LastName varchar(255),&lt;/li&gt;
&lt;li&gt;FirstName varchar(255)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;sql Constraints&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;used to limit the type of data that can go into a table&lt;/li&gt;
&lt;li&gt;it can be specified when a table is created/altered&lt;/li&gt;
&lt;li&gt;&lt;b&gt;NOT NULL&lt;/b&gt; constraint &lt;/li&gt;
&lt;ul&gt;&lt;li&gt;it enforces a column to NOT  accept NULL values&lt;/li&gt;
&lt;li&gt;by default , a table column can hold NULL values&lt;/li&gt;
&lt;li&gt;it enforces a field to always contain a value.so u can&#39;t insert a new record or update a record&amp;nbsp;without adding a value to this field&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;P_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;UNIQUE constraint&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; it uniquely identifies each record in a db table&lt;/li&gt;
&lt;li&gt;both UNIQUE &amp;amp; PRIMARY KEY constraints provide a guarantee for uniqueness for a col/set of cols&lt;/li&gt;
&lt;li&gt;PRIMARY KEY constraints automatically has a UNIQUE constraint defined on it&lt;/li&gt;
&lt;li&gt;we may have many UNIQUE constraints per table but only one PRIMARY KEY constraint per table&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;different Constraints on diff cols&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;In &lt;b&gt;SQL Server/oracle/access&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;&amp;nbsp;(&lt;/li&gt;
&lt;li&gt;P_Id int NOT NULL UNIQUE,&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;In MYSQL&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;P_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255),&lt;/li&gt;
&lt;li&gt;City varchar(255),&lt;/li&gt;
&lt;li&gt;UNIQUE (P_Id)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;u&gt;one time on diff cols (&lt;/u&gt;&lt;/b&gt;multiple cols&lt;b&gt;&lt;u&gt;)(&lt;/u&gt;&lt;/b&gt;mysql/sqlserver/oracle/access&lt;b&gt;&lt;u&gt;)&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;&amp;nbsp;(&lt;/li&gt;
&lt;li&gt;&amp;nbsp;P_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255),&lt;/li&gt;
&lt;li&gt;City varchar(255),&lt;/li&gt;
&lt;li&gt;CONSTRAINT uc_PersonID UNIQUE (P_Id,LastName)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Constraints on ALTER TABLE stmnt&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ALTER TABLE Persons ADD UNIQUE (P_Id)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;for multiple cols&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; ALTER TABLE Persons ADD CONSTRAINT uc_PersonID UNIQUE (P_Id,LastName)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;DROP CONSTRAINT&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;to DROP Unique&lt;/li&gt;
&lt;li&gt;&lt;b&gt;In SQLServer/Oracle/MS Access&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; ALTER TABLE Persons DROP CONSTRAINT uc_PersonID&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;In MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; ALTER TABLE Persons DROP INDEX uc_PersonID&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;PRIMARY KEY constraint&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;it uniquely identifies each record in a db table&lt;/li&gt;
&lt;li&gt;Primary Key col must contain unique values, can&#39;t contain NULL values, ONLY one Primary Key of each table&lt;/li&gt;
&lt;li&gt;each table should have a PK &amp;amp; each table can have only one PK&lt;/li&gt;
&lt;li&gt;In &lt;b&gt;sqlserver/oracle/access&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;&amp;nbsp;(&lt;/li&gt;
&lt;li&gt;P_Id int NOT NULL PRIMARY KEY,&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;for &lt;b&gt;MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;P_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255),&lt;/li&gt;
&lt;li&gt;PRIMARY KEY (P_Id)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;use PK(Primary Key) on multiple cols&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;P_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255),&lt;/li&gt;
&lt;li&gt;CONSTRAINT pk_PersonID PRIMARY KEY (P_Id,LastName)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;PK on ALTER TABLE&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ALTER TABLE Persons ADD PRIMARY KEY (P_Id)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;on multiple cols&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;ALTER TABLE Persons ADD CONSTRAINT pk_PersonID PRIMARY KEY (P_Id,LastName)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;if you use ALTER TABLE stmnt to add PK, PK col(s) must already have been declared to not contain NULL values&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;u&gt;DROP CONSTRAINT&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ALTER TABLE Persons DROP CONSTRAINT pk_PersonID&lt;/li&gt;
&lt;li&gt;&lt;b&gt;In MySQL&lt;/b&gt;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;ALTER TABLE Persons DROP PRIMARY KEY&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;FOREIGN KEY constraint&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;FOREIGN KEY in one table points to a PK in another table&lt;/li&gt;
&lt;li&gt;This constraint is used to prevent actions that would destroy link b/w tables.&lt;/li&gt;
&lt;li&gt;it also prevents that invalid data is inserted into the foreign key column, since it has to be one of the&amp;nbsp;values contained in the table it points to.&lt;/li&gt;
&lt;li&gt;In &lt;b&gt;SQL Server,Oracle,MS Access&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;CREATE TABLE Orders&lt;/li&gt;
&lt;li&gt;&amp;nbsp;(&lt;/li&gt;
&lt;li&gt;&amp;nbsp;O_Id int NOT NULL PRIMARY KEY,&lt;/li&gt;
&lt;li&gt;OrderNo int NOT NULL,&lt;/li&gt;
&lt;li&gt;P_Id int FOREIGN KEY REFERENCES Persons(P_Id)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;In &lt;b&gt;MYSQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;CREATE TABLE Orders&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;O_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;OrderNo int NOT NULL,&lt;/li&gt;
&lt;li&gt;P_Id int,&lt;/li&gt;
&lt;li&gt;PRIMARY KEY (O_Id),&lt;/li&gt;
&lt;li&gt;FOREIGN KEY (P_Id)  REFERENCES Persons(P_Id)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;allow naming of&amp;nbsp;FOREIGN KEY constraint&amp;nbsp;&amp;amp; apply on multiple&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;CREATE TABLE Orders&amp;nbsp;&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;O_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;columns OrderNo int NOT NULL,&lt;/li&gt;
&lt;li&gt;P_Id int,&lt;/li&gt;
&lt;li&gt;PRIMARY KEY (O_Id),&lt;/li&gt;
&lt;li&gt;CONSTRAINT fk_PerOrders FOREIGN KEY (P_Id)&lt;/li&gt;
&lt;li&gt;REFERENCES Persons(P_Id)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;using ALTER stmnt&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ALTER TABLE Orders&lt;/li&gt;
&lt;li&gt;ADD FOREIGN KEY (P_Id)&lt;/li&gt;
&lt;li&gt;REFERENCES Persons (P_Id)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;allow naming of&amp;nbsp;FOREIGN KEY constraint&amp;nbsp;&amp;nbsp;&amp;amp; apply on multiple&amp;nbsp;columns&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;ALTER TABLE Orders&lt;/li&gt;
&lt;li&gt;ADD CONSTRAINT fk_PerOrders&lt;/li&gt;
&lt;li&gt;FOREIGN KEY (P_Id)&lt;/li&gt;
&lt;li&gt;REFERENCES Persons (P_Id)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Drop FK constraint&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ALTER TABLE Orders&lt;/li&gt;
&lt;li&gt;DROP CONSTRAINT fk_PerOrders&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;In &lt;b&gt;MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ALTER TABLE Orders&lt;/li&gt;
&lt;li&gt;DROP FOREIGN KEY fk_PerOrders&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;CHECK constraint&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CHECK constraint is used to limit the value range that can be placed in a column/table.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;for col&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; if define on a single col it allow only certain values for this col.&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;for table&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; if define on a table, it can limit the values in certain cols based on values in other cols in the row.&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;E.g.&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Below constraint specifies that col &quot;P_Id&quot; must only include intergers &amp;gt;0&lt;/li&gt;
&lt;li&gt;For &lt;b&gt;SQL Server,&amp;nbsp;Oracle,&amp;nbsp;MS Access&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;&amp;nbsp;(&lt;/li&gt;
&lt;li&gt;&amp;nbsp;P_Id int NOT NULL CHECK (P_Id&amp;gt;0),&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255),&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;In &lt;b&gt;MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;P_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255),&lt;/li&gt;
&lt;li&gt;CHECK (P_Id&amp;gt;0)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;allow naming of&amp;nbsp;CHECK constraint&amp;nbsp;&amp;amp; apply on multiple&amp;nbsp;columns&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;P_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255),&lt;/li&gt;
&lt;li&gt;Address varchar(255),&lt;/li&gt;
&lt;li&gt;City varchar(255),&lt;/li&gt;
&lt;li&gt;CONSTRAINT chk_Person CHECK (P_Id&amp;gt;0 AND City=&#39;Sandnes&#39; )&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;using ALTER stmnt&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; ALTER TABLE Persons&lt;/li&gt;
&lt;li&gt;ADD CHECK (P_Id&amp;gt;0)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;for naming &amp;amp; multiple&amp;nbsp;cols&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; ALTER TABLE Persons&lt;/li&gt;
&lt;li&gt;&amp;nbsp;ADD CONSTRAINT chk_Person CHECK (P_Id&amp;gt;0 AND City=&#39;Sandnes&#39;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Drop CHECK&amp;nbsp;constraint&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;   ALTER TABLE Persons&lt;/li&gt;
&lt;li&gt;DROP CONSTRAINT chk_Person&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DEFAULT constraint&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;used to insert a default value into a col &amp;amp; default value will be added to all new records, if no other value is specified&lt;/li&gt;
&lt;li&gt;E.g.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;CREATE TABLE Persons&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;P_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255),&lt;/li&gt;
&lt;li&gt;Address varchar(255),&lt;/li&gt;
&lt;li&gt;City varchar(255) DEFAULT &#39;Delhi&#39;&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;it can also be used to insert system values, by using functions like GETDATE()&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE Orders&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;O_Id int NOT NULL,&lt;/li&gt;
&lt;li&gt;OrderNo int NOT NULL,&lt;/li&gt;
&lt;li&gt;P_Id int,&lt;/li&gt;
&lt;li&gt;OrderDate date DEFAULT GETDATE()&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;using ALTER stmnt&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ALTER TABLE Persons&lt;/li&gt;
&lt;li&gt;ALTER COLUMN City SET DEFAULT &#39;Delhi&#39;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;in MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; ALTER TABLE Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ALTER City SET DEFAULT &#39;Delhi&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;drop DEFAULT&amp;nbsp;constraint&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;ALTER TABLE Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&amp;nbsp;ALTER COLUMN City DROP DEFAULT&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;in MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; ALTER TABLE Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ALTER City DROP DEFAULT&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;AUTO INCREMENT&amp;nbsp;field&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Auto-increment allows a unique number to be generated when a new record is inserted into a table.&lt;/li&gt;
&lt;li&gt;very often we would like the value of the PK field to be created automatically every time a new record is inserted.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;In sql server&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ms sql server uses IDENTITY keyword to perform an auto-increment feature.&lt;/li&gt;
&lt;li&gt;by default, starting value for IDENTITY is 1 &amp;amp; it will increment by 1 for each new record&lt;/li&gt;
&lt;li&gt;to sepecify starting value=10 &amp;amp; increment by 5, change the IDENTITY to IDENTITY(10,5)&lt;/li&gt;
&lt;li&gt;To insert a new record , we don&#39;t need to specify a value for the AUTO-INCREMENT field, a unique value will be&amp;nbsp;added automatically.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;E.g.&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;CREATE TABLE Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;(&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;P_Id int PRIMARY KEY IDENTITY,&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;LastName varchar(255) NOT NULL,&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FirstName varchar(255),&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Address varchar(255),&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;City varchar(255) DEFAULT &#39;Delhi&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;E.g. with different start no&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; CREATE TABLE Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;(&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;P_Id int PRIMARY KEY IDENTITY(10,5),&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;LastName varchar(255) NOT NULL,&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FirstName varchar(255),&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Address varchar(255),&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;City varchar(255) DEFAULT &#39;Delhi&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;)&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;In ms access&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt; CREATE TABLE Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;(&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;P_Id int PRIMARY KEY AUTOINCREMENT,&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;LastName varchar(255) NOT NULL,&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FirstName varchar(255),&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Address varchar(255),&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;City varchar(255)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;i&gt;&lt;/i&gt;NOTE: use AUTOINCREMENT(10,5)  for same purpose as in ms sql server&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;In MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt; CREATE TABLE Persons&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;P_Id int NOT NULL AUTO_INCREMENT,&lt;/li&gt;
&lt;li&gt;LastName varchar(255) NOT NULL,&lt;/li&gt;
&lt;li&gt;FirstName varchar(255),&lt;/li&gt;
&lt;li&gt;Address varchar(255),&lt;/li&gt;
&lt;li&gt;City varchar(255),&lt;/li&gt;
&lt;li&gt;PRIMARY KEY (P_Id)&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;In MySQL&amp;nbsp;to start with&amp;nbsp;other value than 1&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; ALTER TABLE Persons AUTO_INCREMENT=100&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;In Oracle&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; in oracle, to use autoincrement field, we will have to create an auto-increment field with the sequence object &amp;nbsp;(this object generates a number sequence)&lt;/li&gt;
&lt;li&gt;E.g.&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;CREATE SEQUENCE seq_person&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;MINVALUE 1&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;START WITH 1&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;INCREMENT BY 1&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;CACHE 10&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;above code creates a sequence object that starts with 1 &amp;amp; will increment by 1. It will also cache up to 10 values for&amp;nbsp;performance.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;The cache option specifies how many sequence values will be stored in memory for faster access.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;E.g.&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;INSERT INTO Persons (P_Id,FirstName,LastName)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;VALUES(seq_person.nextval,&#39;Ram&#39;, &#39;Mohan&#39;)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;To insert a new record, we will have to use the nextval function of seq_person object to retrieve the next value&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;ALTER TABLE&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;used to add,delete or modify cols in an existing table.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;add col&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; ALTER TABLE Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ADD DateOfBirth date&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;modify(change&amp;nbsp;data type)&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;ALTER TABLE Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ALTER  COLUMN DateOfBirth year&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;delete a col&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;NOTE: some db not allow deleting the column so check your db&lt;/li&gt;
&lt;li&gt;&lt;b&gt;E.g.&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;ALTER TABLE Persons&lt;/li&gt;
&lt;li&gt;DROP  COLUMN DateOfBirth&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;DROP TABLE&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;DROP TABLE----------------&amp;gt; deletes a table&lt;/li&gt;
&lt;li&gt;&lt;b&gt;E.g&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;DROP TABLE Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;CREATE INDEX&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;CREATE INDEX-------------&amp;gt;creates an index(search key)&lt;/li&gt;
&lt;li&gt;used to create indexes in tables either on single col or on multiple cols to find data more quickly &amp;amp; efficiently.&lt;/li&gt;
&lt;li&gt;it allow db application to find data fast; without reading the whole table&lt;/li&gt;
&lt;li&gt;user/developer can&#39;t see the indexes, they are just used to speed up searches/queries.&lt;/li&gt;
&lt;li&gt;NOTE: updating a table with indexes takes more time that updating a table without (since indexes also need an&amp;nbsp;update). So you should only create indexes on cols (&amp;amp; tables) that will be frequently searched against.&lt;/li&gt;
&lt;li&gt;NOTE:systax for creating indexes varies amongst diff db. So check its syntax in your db&lt;/li&gt;
&lt;li&gt;&lt;b&gt;syntax (allow duplicate)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; In below syntax  duplicate values are allowed.&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;CREATE INDEX a&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ON table1 (col1)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;syntax (duplicate&amp;nbsp;not allowed)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;e.g.&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;&amp;nbsp;CREATE UNIQUE INDEX a&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&amp;nbsp;ON table1 (col1)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;e,g,&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;CREATE INDEX PIndex&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ON Persons (LastName)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;on multiple cols&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; CREATE INDEX PIndex&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ON Persons (LastName, FirstName)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;DROP INDEX&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;DROP INDEX----------------&amp;gt; deletes an index&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;In&amp;nbsp;MS SQL SERVER&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;DROP INDEX Persons.Pindex&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;In MS Access&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;DROP INDEX Pindex ON Persons&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;In DB2/Oracle&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;DROP INDEX Pindex&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;In MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; ALTER TABLE Persons DROP INDEX Pindex&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;CREATE VIEW stmnt&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;a view is a virtual table based on the result-set of an SQL stmnt either from one or more tables&lt;/li&gt;
&lt;li&gt;We can add SQL functions,WHERE,JOIN etc stmnt to a view &amp;amp; present the data as if the data were coming&amp;nbsp;from one single table.&lt;/li&gt;
&lt;li&gt;a view always shows up-to-date data! The db engine recreates the data, using the view&#39;s SQL stmnt, every time a&amp;nbsp;user queries a view.&lt;/li&gt;
&lt;li&gt;If you have NORTHWIND db , u can see that it has several views installed by default. E.g.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;e.g.1&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; CREATE VIEW [Products Above Average Price] AS&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT ProductName,UnitPrice&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FROM Products&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;WHERE UnitPrice&amp;gt;(SELECT AVG(UnitPrice) FROM Products)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;we can query the above view as follows:&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * FROM [Products Above Average Price]&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;e.g.2&amp;nbsp;&lt;/b&gt;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;below view calculates the total sale for each category in 1997.NOTE: it selects its data from another view&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;CREATE VIEW [Category Sales For 1997] AS&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT DISTINCT CategoryName,Sum(ProductSales) AS CategorySales&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FROM [Product Sales for 1997]&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;GROUP BY CategoryName&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;accessing the view&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; SELECT * FROM [Category Sales For 1997]&lt;/li&gt;
&lt;li&gt;WHERE CategoryName=&#39;Beverages&#39;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;modify a view&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;we can update a view by using &quot;CREATE OR REPLACE VIEW&quot; syntax&lt;/li&gt;
&lt;li&gt;below code add a new col &quot;Category&quot; in view &quot;Current Product List&quot;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;CREATE OR REPLACE VIEW [Current Product List] AS&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT ProductID,ProductName,Category&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FROM Products&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;WHERE Discontinued=&#39;No&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DROP VIEW stmnt&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;delete a view&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;DROP VIEW [Current Product List]&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;DML  DML   DML   DML  DML   DML  DML  DML  DML   DML  DML  DML  DML   DML  DML&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;6 SELECT stmnt&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;select stmnt is used to select data from a db &amp;amp; result is stored in a result table called &quot;result-set&quot;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;*&amp;nbsp;the asterisk (*)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;the asterisk (*) is used to select all columns&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * FROM customers&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;selected column&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;it return only those column which are mentioned in SQL stmnt&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT firstname,city FROM customers&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Distinct&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; this keyword is used to return only distinct(different) values&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT DISTINCT city FROM customers&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;WHERE clause&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;used to filter records ie to extract only those records that fulfill a specified criterion&lt;/li&gt;
&lt;li&gt;SQL uses single quotes arount text,date &amp;amp; time  values(most db systems will also accept double quotes)&lt;/li&gt;
&lt;li&gt;Numeric values should not be enclosed in quotes&lt;/li&gt;
&lt;li&gt;Operators allowed in it&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;(= , &amp;lt;&amp;gt; , &amp;gt; , &amp;lt; , &amp;gt;= , &amp;lt;= )&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;note:- in some versions of SQL  &amp;lt;&amp;gt; operator may be written as != )&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT Company,Country FROM Customers WHERE country &amp;lt;&amp;gt; &#39;USA&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT Company,Country FROM Customers WHERE sal &amp;gt;= 250250&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;BETWEEN&lt;/b&gt;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;-&amp;gt; between an inclusive range ( same as &amp;gt;= and &amp;lt;=)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;used to select a range of data b/w two values (both inclusive).values may be no,text,dates&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * FROM Persons WHERE LastName BETWEEN &#39;Arun&#39; AND &#39;Sachin&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;i&gt;&lt;/i&gt;in different db, either 1st value or 2nd value or both or neither  is inclusive , so check your db&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;NOT BETWEEN&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; SELECT * FROM Persons WHERE LastName NOT BETWEEN &#39;Arun&#39; AND &#39;Sachin&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;IN&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;-&amp;gt; If you know the exact value you want to return for at least one of the columns&lt;/li&gt;
&lt;li&gt; allow to specify multiple values in a WHERE clause&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * FROM Persons WHERE LastName IN ( &#39;Kakkar&#39; , &#39;Yadav&#39;)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;NOT IN&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; SELECT * FROM Persons WHERE LastName NOT IN ( &#39;Kakkar&#39; , &#39;Yadav&#39;)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;LIKE&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;-&amp;gt;Search for a pattern, can use wild cards&lt;/li&gt;
&lt;li&gt; used to search a specified pattern in a column&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * FROM customers WHERE companyname LIKE &#39;a%&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT * FROM customers WHERE companyname LIKE &#39;%tav%&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;NOT LIKE&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; SELECT * FROM customers WHERE companyname NOT LIKE &#39;%tav%&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;b&gt;SQL Wildcards&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;used to search data in db&lt;/li&gt;
&lt;li&gt;&lt;b&gt;%&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; used to search data in db&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;_&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; substitute for exactly one character&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT * FROM customers WHERE companyname LIKE &#39;_av&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT * FROM customers WHERE companyname  LIKE &#39;A_u_Kakkar&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;[charlist]&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; any single character in charlist&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT * FROM customers WHERE companyname LIKE &#39;[avt]%&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;above will display all records where companyname begins with either a or v or t&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;[^charlist] &lt;/b&gt;or&lt;b&gt;&amp;nbsp;[!charlist]&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;  any single character not in charlist&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT * FROM customers WHERE companyname LIKE &#39;[!avt]%&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;above will display all records where companyname not begins with either a or v or t&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;sql AND operator&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;used to filter records based on more than one conditions&lt;/li&gt;
&lt;li&gt;display a record only if both the first condition &amp;amp; the 2nd condition is TRUE&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT * FROM persons WHERE FirstName=&#39;Tove&#39; AND LastName=&#39;Svendson&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;sql OR operator&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;used to filter records based on more than one conditions&lt;/li&gt;
&lt;li&gt;display a record  if either the first condition  or  the 2nd condition is TRUE&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT * FROM persons WHERE FirstName=&#39;Tove&#39; OR LastName=&#39;Svendson&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;combining AND &amp;amp; OR&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;can be combined by using parenthesis to form complex expressions&lt;/li&gt;
&lt;li&gt;SELECT * FROM Persons WHERE LastName=&#39;Svendson&#39; AND (FirstName=&#39;Tove&#39; OR FirstName=&#39;Ola&#39;)&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;ORDER BY keyword&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;sort result-set by a specified column, by default it sort in ascending order  (&lt;b&gt;ASC&lt;/b&gt;)&lt;/li&gt;
&lt;li&gt;to sort in descending order use &lt;b&gt;DESC&lt;/b&gt; keyword&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT * FROM Persons ORDER BY LastName&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT * FROM Persons ORDER BY LastName DESC&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;IS NULL operator&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; NOTE:&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Null&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;is an absence of a value.&lt;/li&gt;
&lt;li&gt;NULL isn&#39;t allocated any memory&lt;/li&gt;
&lt;li&gt;the string with NUll value is just a pointer which is pointing to nowhere in memory.&lt;/li&gt;
&lt;li&gt;Null has no bounds, it can be used for string, integer, date, etc. fields in a database.&lt;/li&gt;
&lt;li&gt;Null is the database&#39;s determination of an absense of a value logically, so to speak&lt;/li&gt;
&lt;li&gt;By default, a table column can hold NULL values.&lt;/li&gt;
&lt;li&gt;it is not possible to compare NULL &amp;amp; 0 . They are not equivalent.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT * FROM Persons WHERE Address IS NULL&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;An empty string&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;  is a value, but is just empty.&lt;/li&gt;
&lt;li&gt;Empty IS allocated to a memory location, although the value stored in the memory is &quot;&quot;.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Empty string is just regarding a string; it&#39;s a string like &#39;asdfasdf&#39; is, but is just has no length.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;If you have no value for a field, use null, not an empty string.&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;IS NOT NULL&amp;nbsp;operator&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; SELECT * FROM Persons WHERE Address IS NOT NULL&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;INSERT INTO stmnt&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;used to insert a new row/record in a table&lt;/li&gt;
&lt;li&gt;&lt;b&gt;one way (Method)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;doesn&#39;t specify column names where the data will be inserted, only their values&lt;/li&gt;
&lt;li&gt;&lt;i&gt;INSERT INTO Persons VALUES (4,&#39;Nilsen&#39; , &#39;Johan&#39;, &#39;Bakken2&#39; , &#39;Stavanger&#39; )&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;2nd way (Method)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;it specifies both the column names &amp;amp; values to be inserted&lt;/li&gt;
&lt;li&gt;&lt;i&gt;INSERT INTO Persons (P_Id, LastName,FirstName) VALUES (5,&#39;Tom&#39;, &#39;Ram&#39;)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;3rd Way (Method)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;/li&gt;
&lt;i&gt;
&lt;li style=&quot;display: inline !important;&quot;&gt;INSERT INTO TempTbl(ClientName,Item) SELECT ClientName,Item FROM TempTbl WHERE Srno=948&lt;/li&gt;
&lt;/i&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;/li&gt;
&lt;i&gt;
&lt;li style=&quot;display: inline !important;&quot;&gt;&lt;/li&gt;
&lt;/i&gt;&lt;b&gt;*=&lt;/b&gt;    &lt;ul&gt;&lt;li&gt; in older version , it represent left outer join&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;=*&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; in older version , it represent right outer join&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;use Statement&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;USE Master&lt;/li&gt;
&lt;li&gt;USE MyDataBase1&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&lt;/b&gt;&lt;b&gt;E.g of some important/Usefull queries showing use of various operators/keywords&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;e.g1&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;select productmaster.SHOPNO,productmaster.MODELNO,&lt;/i&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;isnull(sum(isnull(ProductMaster.Qty,0)),0) as PQTY,&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;case productmaster.MODELNO&lt;/i&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;when productmaster.MODELNO&lt;/i&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;then (Select isnull(sum(isnull(ComponentMaster.Qty,0)),0)&amp;nbsp;from ComponentMaster&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;where ComponentMaster.MODELNO=ProductMaster.MODELNO and ComponentMaster.SHOPNO=ProductMaster.SHOPNO)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;i&gt;else 0&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;end as SQTY,&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;i&gt;case productmaster.MODELNO&lt;/i&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;when productmaster.MODELNO&lt;/i&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;then (isnull(sum(isnull(ProductMaster.Qty,0)),0)-(Select isnull(sum(isnull(ComponentMaster.Qty,0)),0)&amp;nbsp;from ComponentMaster&lt;/i&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;where ComponentMaster.MODELNO=ProductMaster.MODELNO and ComponentMaster.SHOPNO=ProductMaster.SHOPNO))&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;i&gt;else 0&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;end as BALQTY&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;i&gt;From PRDMODELSTKDTL&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;left outer JOIN PRODUCTMASTER ON PRDMODELSTKDTL.modelno=productmaster.MODELNO&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;group by PRODUCTMASTER.SHOPNO,PRODUCTMASTER.MODELNO&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;UPDATE stmnt&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;used to update existing records in a table&lt;/li&gt;
&lt;li&gt;in it WHERE clause specifies which record or records should be updated.&lt;/li&gt;
&lt;li&gt;if WHERE clause is omitted , all records will be updated&lt;/li&gt;
&lt;li&gt;&lt;i&gt;UPDATE Persons SET Address=&#39;Abc&#39; , City=&#39;pqr&#39; WHERE LastName=&#39;m&#39; AND FirstName=&#39;mm&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;DELETE stmnt&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;used to delete records/rows in a table&lt;/li&gt;
&lt;li&gt;in it WHERE clause specifies which record or records should be deleted.&lt;/li&gt;
&lt;li&gt;if WHERE clause is omitted , all records will be deleted&lt;/li&gt;
&lt;li&gt;&lt;i&gt;DELETE FROM Persons WHERE LastName=&#39;abc&#39; AND FirstName=&#39;p&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;b&gt;delete all rows&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;one way&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; DELETE FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;2nd way&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; DELETE * FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;3rd way&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;using TRUNCATE stmnt&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;delete all rows from the table&lt;/li&gt;
&lt;li&gt;&lt;i&gt;TRUNCATE TABLE Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;TOP Clause&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;used to specify the no of records to return&lt;/li&gt;
&lt;li&gt;Note:-&amp;gt;not all db systems support the TOP clause&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT TOP no|percent col1 FROM T1&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT TOP 2 * FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT TOP 50 PERCENT * FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;b&gt;Top in MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * FROM Persons LIMIT 5&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Top in Oracle&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * FROM Persons WHERE ROWNUM &amp;lt;= 5&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;&amp;nbsp;AS  (SQL Alias)&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;an alias name can be given to a table or to a column  with alias&lt;/li&gt;
&lt;li&gt;&lt;b&gt;E.g with Alias&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT t1.OrderID,t2.LastName,t2.FirstName&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FROM Persons AS t2 , Product_Orders AS t1&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;WHERE t2.LastName=&#39;Ram&#39; AND t2.FirstName=&#39;Mohan&#39;&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;E.g without alias&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT Product_Orders.OrderID,Persons.LastName,Persons.FirstName&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;FROM Persons , Product_Orders&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;WHERE Persons.LastName=&#39;Ram&#39; AND Persons.FirstName=&#39;Mohan&#39;&lt;/i&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;&amp;nbsp;sample tables -&amp;gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;&lt;b&gt;Persons&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt; P_Id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LastName &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FirstName &amp;nbsp; &amp;nbsp;Address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; City&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Kakkar &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Arun &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; C-13 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Delhi&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Gupta &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vikas &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; H.No. 323 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VikasPuri&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Orders&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;O_Id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OrderNo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;P_Id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OrderDate &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OrderPrice &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Customer&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;77895 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;07/05/2010 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;25000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ram&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;44678 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;05/05/2010 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;800 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mohan&lt;/li&gt;
&lt;li&gt;&amp;nbsp;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22456 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;07/04/2010 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4100 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ganesh&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;24562 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;07/05/2009 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8500 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mohan&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;34764 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;25/03/2010 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;98500 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Ram&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;Employees_Norway&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt; E_Id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; E_Name&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;01 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Ram&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;02 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Krishan&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;03 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mohan&lt;/li&gt;
&lt;li&gt;&amp;nbsp;04 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Jesus&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;Employees_USA&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt; E_Id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;E_Name&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;01 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Vishnu&lt;/li&gt;
&lt;li&gt;&amp;nbsp;02 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Krishan&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;03 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Ganesh&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;04 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Brahma&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;&amp;nbsp;SQL JOINS&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;JOIN keyword is used to query data from 2 or more tables, based on a relationship b/w certain cols in these tables&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;b&gt;&lt;u&gt;&amp;nbsp;Types of JOINS&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;INNER JOIN&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; return rows when there is atleast one match in both tables&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Join&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt; SELECT p.LastName,p.FirstName, or.OrderNo&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FROM Persons as p INNER JOIN Orders as or   ON p.p_Id=or.P_Id&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ORDER BY p.LastName&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&amp;nbsp;above query return all the persons with any orders.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Self-Join&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Natural-Join&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;OUTER JOIN&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Left Join&lt;/b&gt;&amp;nbsp;(&lt;b&gt;Left Outer Join)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;return all rows from left table, even if there is no matches in right table&lt;/li&gt;
&lt;li&gt;in some db, Left Join is called Left Outer Join&lt;/li&gt;
&lt;li&gt;below query show all persons &amp;amp; their orders if any (if for a persons orderno not present then orderno will be blank&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT P.LastName, Or.OrderNo&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FROM Persons as P LEFT JOIN Orders as Or ON P.P_Id=Or.P_Id&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ORDER BY P.LastName&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;it returns all rows from persons even if there are no matches in orders table&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Right Join (Right Outer Join)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;return all rows from right table, even if there is no matches in left table&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;below query return all orders with containing persons if any&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT P.LastName, Or.OrderNo&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FROM Persons as P RIGHT JOIN Orders as Or ON P.P_Id=Or.P_Id&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;ORDER BY P.LastName&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;it returns all rows from Orders even if there are no matches in Persons table&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Full Join&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;return rows when there is a match in one of the tables&lt;/li&gt;
&lt;li&gt;below returns all persons &amp;amp; their Orders &amp;amp; all orders with their persons&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;SELECT P.LastName, Or.OrderNo&amp;nbsp;&lt;/li&gt;
&lt;li&gt;FROM Persons as P FULL JOIN Orders as Or ON P.P_Id=Or.P_Id&lt;/li&gt;
&lt;li&gt;ORDER BY P.LastName&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;it returns all rows from persons &amp;amp; all rows from orders table&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;CROSS JOIN&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;sql UNION Operator&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;it combines the result-set of two or more SELECT stmnts&amp;nbsp;&lt;/li&gt;
&lt;li&gt;each SELECT stmnt must have same no of cols,similar data types, &amp;amp; all cols must be in same order&lt;/li&gt;
&lt;li&gt;it selects only distinct values by default&lt;/li&gt;
&lt;li&gt;cols names in result-set of a UNION are always equal to the col names in the first SELECT stmnt in UNION&lt;/li&gt;
&lt;li&gt;Below query list all DIFFERENT employees in Norway &amp;amp; USA&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT E_Name FROM Employees_Norway&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;UNION&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT E_Name FROM Employees_USA&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;above query will return krishan only once&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;UNION ALL&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;it is used to allow duplicate values, which is not possible in UNION operator&lt;/li&gt;
&lt;li&gt;Below query list all employees in Norway &amp;amp; USA&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT E_Name FROM Employees_Norway&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;UNION ALL&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT E_Name FROM Employees_USA&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;above query will return krishan Twice&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;&lt;b&gt;sql SELECT INTO&amp;nbsp;&lt;/b&gt;&amp;nbsp;&lt;b&gt;stmnt&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;used to create backup copies of tables&lt;/li&gt;
&lt;li&gt;it select data from one table &amp;amp; inserts it into a different table&lt;/li&gt;
&lt;li&gt;&lt;b&gt;copy in same db&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * INTO Persons_BackUp FROM Persons&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;copy in diff db&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * INTO Persons_BackUp IN &#39;Backup.mdb&#39; FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;copy only some cols&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT LastName,FirstName INTO Persons_Backup FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&amp;nbsp;WHERE city=&#39;Delhi&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;copy from 2 tables&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT P.FirstName, Or.OrderNo INTO Persons_Orders_Backup&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;FROM Persons as P INNER JOIN Orders as Or ON P.P_Id=Or.P_Id&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal;&quot;&gt;&lt;b&gt;&lt;u&gt;SQL built-in functions-&amp;gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;ul&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;SQL DATES functions&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;The most difficult part when working with the dates is to be sure that the format of the date you are trying to insert, matches the format of the date column in the db.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;As long as your data contains only the date portion, your queries will work as expected.However, if a time portion is involved, it gets complicated.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;In SQL Server built in Date functions&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt; GETDATE()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Returns the current date and time &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DATEPART()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Returns a single part of a date/time&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DATEADD()&lt;/b&gt;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Adds or subtracts a specified time interval from a date&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DATEDIFF()&lt;/b&gt;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Returns the time between two dates&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;CONVERT()&lt;/b&gt;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Displays date/time data in different formats&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;data types for date&lt;/b&gt;&amp;nbsp;&lt;b&gt;in sql server&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; sql server has following data types for storing a date or a date/time value in the database;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;DATE&lt;/b&gt; --&amp;gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;format&lt;/b&gt; YYYY-MM-DD&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DateTime&lt;/b&gt;&amp;nbsp;---&amp;gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;format&lt;/b&gt;: YYYY-MM-DD HH:MM:SS&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;SmallDate&lt;/b&gt;&lt;b&gt;Time&lt;/b&gt;&amp;nbsp;--&amp;gt;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;format&lt;/b&gt;: YYYY-MM-DD HH:MM:SS&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;TIMESTAMP&lt;/b&gt; --&amp;gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;format&lt;/b&gt; : a unique number&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;In MySQL built-in date functions&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt; NOW()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Returns the current date and time&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;CURDATE()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Returns the current date&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;CURTIME()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Returns the current time&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DATE()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Extracts the date part of a date or date/time expression&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;EXTRACT()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Returns a single part of a date/time&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DATE_ADD()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Adds a specified time interval to a date&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DATE_SUB()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Subtracts a specified time interval from a date&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DATEDIFF()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Returns the number of days between two dates&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DATE_FORMAT()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Displays date/time data in different formats&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;data types for date&amp;nbsp;in MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt; DATE&lt;/b&gt; --&amp;gt;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;format&lt;/b&gt; YYYY-MM-DD&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;DATETIME&lt;/b&gt; ---&amp;gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;format&lt;/b&gt;: YYYY-MM-DD HH:MM:SS&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;TIMESTAMP&lt;/b&gt; --&amp;gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;format&lt;/b&gt;: YYYY-MM-DD HH:MM:SS&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;YEAR&lt;/b&gt; --&amp;gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;format&lt;/b&gt; YYYY or YY&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;E.g&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * FROM Orders WHERE OrderDate=&#39;2008-11-11&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;if orderdate don&#39;t have time component, we will get proper result.&lt;/li&gt;
&lt;li&gt;if orderdate have time component, we will not get any resultant row.&lt;/li&gt;
&lt;li&gt;if you want to keep your queries simple &amp;amp; easy to maintain, do not allow time components in your date field.&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;sql NULL functions&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;ISNULL()&lt;/b&gt; ( In SQL Server &amp;amp; MS Access)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT Name,Price*(Units +ISNULL(extraUnits,0)) FROM OrdersBill&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;NVL()&lt;/b&gt; (In Oracle)&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT Name,Price*(Units +NVL(extraUnits,0)) FROM OrdersBill&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;IFNULL()&lt;/b&gt; (mysql)&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT Name,Price*(Units +IFNULL(extraUnits,0)) FROM OrdersBill&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;COALESCE()&lt;/b&gt; (mysql)&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT Name,Price*(Units +COALESCE(extraUnits,0)) FROM OrdersBill&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;SQL Agregate&amp;nbsp;functions&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;they return a single value, calculated from values in a column.&lt;/li&gt;
&lt;li&gt;Aggregate functions often need an added GROUP BY stmnt&lt;/li&gt;
&lt;li&gt;&lt;b&gt;AVG()&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Returns the average value of a numeric col&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT AVG(sal) AS AverageSalary FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;below query show all persons whom salary is above the average salary&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT * FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;WHERE sal&amp;gt;(SELECT AVG(sal) FROM Persons)&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;COUNT()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; returns the number of rows/records&lt;/li&gt;
&lt;li&gt;null values wil not be counted of the specified column&lt;/li&gt;
&lt;li&gt;&lt;b&gt;DISTINCT&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; will count the no of distinct values ot the specified col&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;E.g&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT COUNT(Ename) AS EmployeeName FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;WHERE group=&#39;Operator&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;i&gt;SELECT COUNT(*) FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT COUNT(DISTINCT customer) AS TotalCustomer FROM SaleBillOrders&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT COUNT(Customer) AS Ram FROM Orders&amp;nbsp;WHERE Customer=&#39;Ram&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;MAX()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Returns the largest value of selected col&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT MAX(Age) AS OldestEmplyeeAge FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;MIN()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; returns the smallest value of the selected col&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT MIN(Age) AS YoungestEmplyeeAge FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;SUM()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; returns the total sum of a numeric col&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT SUM(Sal) As TotalSal FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;FIRST()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; return the first value of selected col&lt;/li&gt;
&lt;li&gt;SELECT FIRST(Name) AS PersonName FROM Persons&lt;/li&gt;
&lt;li&gt;&lt;b&gt;if first not work in db&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; SELECT Name FROM Persons ORDER BY O_Id LIMIT 1&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;LAST()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; return the last value of selected col&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT LAST(Name) AS PersonName FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;&lt;/i&gt;&lt;b&gt;if Last() not work in db&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;SELECT Name FROM Persons ORDER BY O_Id DESC LIMIT 1&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;GROUP BY stmnt&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; It is often needed by Aggregate functions to group the result-set by one or more cols&lt;/li&gt;
&lt;li&gt;SELECT Customer,SUM(OrderPrice) FROM Orders&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;GROUP BY Customer&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;SELECT Customer,OrderDate,SUM(OrderPrice) FROM Orders&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;GROUP BY Customer,OrderDate&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;HAVING clause&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; mostly used with GROUP BY stmnt to provide conditions as WHERE keyword&lt;/li&gt;
&lt;li&gt;can&#39;t be used with aggregate functions.&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT Customer,SUM(OrderPrice) FROM Orders&amp;nbsp;GROUP BY Customer&amp;nbsp;HAVING SUM(OrderPrice)&amp;lt;2000&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT Customer,SUM(OrderPrice) FROM Orders WHERE Customer=&#39;Ram&#39; OR Customer=&#39;Mohan&#39; GROUP BY Customer HAVING SUM(OrderPrice)&amp;lt;2000&lt;/i&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;S&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;QL SCALAR&amp;nbsp;functions&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;return a single value based on the input value&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;UCASE() or&amp;nbsp;&lt;/b&gt;&lt;b&gt;UPPER() for SQL server&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; converts a value to upper case&lt;/li&gt;
&lt;li&gt;SELECT UCASE(LastName) AS LastName,FirstName FROM Persons&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;UPPER() for SQL server&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt; SELECT UPPER(LastName) AS LastName,FirstName FROM Persons&amp;nbsp;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;LCASE() or&amp;nbsp;&lt;/b&gt;&lt;b&gt;LOWER() in SQLserver&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; converts a value to lower case&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;SELECT LCASE(LastName) AS LastName,FirstName FROM Persons&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;LOWER() in SQLserver&lt;/b&gt;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;SELECT LOWER(LastName) AS LastName,FirstName FROM Persons&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;MID()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; extract characters from a text field syntax&lt;/li&gt;
&lt;li&gt;&lt;b&gt;SELECT MID(col_Name,Start [,length]) FROM table_name&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;start----&amp;gt; starting position (starts as 1)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;i&gt;SELECT MID(City,1,4) AS SmallCity FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;LEN()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; return the length of a text field&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT LEN(Address) AS LengthOfAddress FROM Persons&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;ROUND()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; rounds a numeric field to the number of decimals specified&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT ProductName,ROUND(UnitPrice,0) AS UnitPrice FROM Products&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;NOW()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; return the current system date &amp;amp; time&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT ProductName,UnitPrice,NOW() AS PerDate FROM Products&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;FORMAT()&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; formats how a field to be displayed&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT ProductName,UnitPrice,FROMAT(NOW(),&#39;YYYY-MM-DD&#39;) as PerDate&amp;nbsp;FROM Products&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;SQL HOSTING&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;If Your web site store &amp;amp; display data from a db, your web server should have&amp;nbsp;access to a db system that uses SQL Language.&lt;/li&gt;
&lt;li&gt;If your web server will be hosted by an ISP (Internet Service Provider) ie you purchase&amp;nbsp;web hosting space (not uses your own pc as webserver &amp;amp; db), you will have to look for SQL Hosting Plans.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;SQL hosting dbs&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; most common are MySQL, MS SQL Server,MS Access&lt;/li&gt;
&lt;li&gt;&lt;b&gt;SQLServer,MS Access&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Runs only on &lt;b&gt;Windows OS&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;MySQL&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; Runs on both Windows and Linux/UNIX OS (very cheap)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;SQL COMMENTS&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;SINGLE LINE (--)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;--this is SINGLE LINE comment&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;MULTIPLE LINES (/* */)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; /* this is multiple line comment method &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this second line is also commented */&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;b&gt;&lt;u&gt;ConnectionString by&amp;nbsp;UDL file (in VB6)&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;open udl file &amp;amp; set connection &amp;amp; to see whole connection string&lt;/li&gt;
&lt;li&gt;open udl file in notepad&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;u&gt;Miscellaneous&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;sysobjects &amp;nbsp;(In MS SQL Server 2000)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; return list of all tables,procedure,functions etc diffenciated by type&lt;/li&gt;
&lt;li&gt;type=p for sp (stored Procedures) , U for User Defined table in db etc&lt;/li&gt;
&lt;li&gt;&lt;b&gt;E.g&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;select * from sysobjects order by type&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Select name from sysobjects where type=&#39;U&#39;&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;use logmaindata ;select name from sysobjects where type=&#39;u&#39; order by name&lt;/i&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;above query give list of all tables in db &quot;logmaindata&quot;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal;&quot;&gt;&lt;i&gt;&lt;b&gt;sysdevices&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;i&gt;return all the devices used/created while taking database backup/restore&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;Use Master ; select * from sysdevices&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;SysDatabases&amp;nbsp;&lt;/b&gt;&lt;b&gt;&amp;nbsp;(In MS SQL Server 2000)&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt; list of all database. To use it, we must use master db first of all&lt;/li&gt;
&lt;li&gt;E.g&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;use master ;&amp;nbsp;select * from sysdatabases order by name&lt;/li&gt;
&lt;li&gt;&lt;i&gt;SELECT COUNT (*) AS CNT FROM SYSDATABASES WHERE NAME=&#39;logmaindata&#39;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;&lt;b&gt;Backup a db&amp;nbsp;&lt;/b&gt;&lt;b&gt;(In MS SQL Server 2000) using VB6&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Below is a procedure in VB6 to take Backup of &amp;nbsp;DB&lt;/li&gt;
&lt;li&gt;Public Sub Manual_Backup()&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;On Error GoTo xer&lt;/li&gt;
&lt;li&gt;Dim Path As String, MyFile As String,   FullPath As String&lt;/li&gt;
&lt;li&gt;Dim num As Integer&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Set create = New FileSystemObject&lt;/li&gt;
&lt;li&gt;With create&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If FrmTool.Check1.Value = 1 Then   &#39;user select default setting&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Path = &quot;C:\Back Up&quot;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;MyFile =   &quot;LogDryClnBakUp.bak&quot;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;FullPath = Path &amp;amp;   &quot;\&quot; &amp;amp; MyFile&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;ElseIf FrmTool.Check1.Value = 0 Then   &#39;if user provide path &amp;amp; file name&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&#39;MyFile =   Trim(FrmTool.TxtName.Text)&lt;/li&gt;
&lt;li&gt;FullPath =   Trim(FrmTool.TxtPath.Text)&lt;/li&gt;
&lt;li&gt;If FullPath = &quot;&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;MsgBox &quot;BackUp has not been taken., Please Give the Path and File   Name&quot;, vbInformation + vbOKOnly&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;If InStr(1, FullPath,   &quot;.bak&quot;) &amp;lt; 1 Then&amp;nbsp;FullPath = FullPath &amp;amp; &quot;.bak&quot;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;MyFile = FullPath&lt;/li&gt;
&lt;li&gt;num = InStr(1, MyFile,   &quot;\&quot;)&lt;/li&gt;
&lt;li&gt;If num &amp;lt; 1 Then MsgBox   &quot;BackUp has not been taken., Please Give the correct Path and File   Name&quot;, vbInformation + vbOKOnly: Exit Sub&lt;/li&gt;
&lt;li&gt;Do While num &amp;gt; 0&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;MyFile = Mid(MyFile, num + 1,   Len(MyFile) - num)&lt;/li&gt;
&lt;li&gt;num = InStr(1, MyFile,   &quot;\&quot;)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Loop&lt;/li&gt;
&lt;li&gt;&#39;MyFile = MyFile &amp;amp;   &quot;.bak&quot;&lt;/li&gt;
&lt;li&gt;Path = Mid$(FullPath, 1, InStr(1,   FullPath, MyFile, vbTextCompare) - 2)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;If .FolderExists(Path) = False Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CreateFolder (Path)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;If .FileExists(FullPath) = True Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Kill FullPath&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Connect GSVRNAME, &quot;sa&quot;,   &quot;&quot;, &quot;master&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;If GREC.State Then GREC.Close&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;GREC.Open &quot;select * from   sysdevices where name=&#39;&quot; &amp;amp; MyFile &amp;amp; &quot;&#39;&quot;, GCON,   adOpenStatic, adLockReadOnly&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;If GREC.EOF = False Then&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;strg = &quot;exec sp_dropdevice   &#39;&quot; &amp;amp; MyFile &amp;amp; &quot;&#39;&quot;       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;GCON.Execute strg       &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;End If       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;strg = &quot;EXEC sp_addumpdevice   &#39;disk&#39;, &#39;&quot; &amp;amp; MyFile &amp;amp; &quot;&#39;,&#39;&quot; &amp;amp; FullPath &amp;amp;   &quot;&#39;&quot;       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;GCON.Execute strg       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;strg = &quot;BACKUP DATABASE   logmaindata TO disk=&#39;&quot; &amp;amp; FullPath &amp;amp; &quot;&#39;&quot;       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;GCON.Execute strg&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;strg = &quot;exec sp_dropdevice   &#39;&quot; &amp;amp; MyFile &amp;amp; &quot;&#39;&quot;       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;GCON.Execute strg&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;       &lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End With       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;MsgBox &quot;Backup Database Successfully   Saved&quot;, vbInformation + vbOKOnly       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Connect GSVRNAME, &quot;sa&quot;,   &quot;&quot;, &quot;logmaindata&quot;       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;strg = &quot;UPDATE Confrigation SET   SettingValue=&#39;N&#39; WHERE SettingName=&#39;AutoBackup&#39;&quot;       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;GCON.Execute strg       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Exit Sub&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&amp;nbsp;xer:       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;MsgBox &quot;There is an error -&amp;gt;   Unable to take BackUp. Please Select Path to Click Brows Button&quot;,   vbInformation + vbOKOnly       &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Connect GSVRNAME, &quot;sa&quot;,   &quot;&quot;, &quot;logmaindata&quot;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&amp;nbsp;End Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;Restore a DB&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;b&gt;(In MS SQL Server 2000) using VB6&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Below is a procedure in VB6 to take Restore DB from above created backup file&lt;/li&gt;
&lt;li&gt;Private Sub CmdRestore_Click()&lt;/li&gt;
&lt;li&gt;On Error GoTo xer&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If Me.Txtpth &amp;lt;&amp;gt; &quot;&quot; Then&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If MsgBox(&quot;The Restore Facility Required to quit from software,&quot; &amp;amp; Chr(13) &amp;amp; &quot; wish to continue&quot;, vbQuestion + vbYesNo) = vbYes Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Me.CmdRestore.Enabled = False: Me.CmdReset.Enabled = False&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Connect GSVRNAME, &quot;sa&quot;, GPWD, &quot;master&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;strg = &quot;RESTORE DATABASE logmaindata FROM disk=&#39;&quot; &amp;amp; Me.Txtpth.Text &amp;amp; &quot;&#39;&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;GCON.Execute strg&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;MsgBox &quot;Database Has Been Successfully Restored&quot;, vbInformation + vbOKOnly&lt;/li&gt;
&lt;li&gt;End&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;MsgBox &quot;Please select the file&quot;, vbInformation + vbOKOnly&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;li&gt;xer:&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CritError&lt;/li&gt;
&lt;li&gt;&#39;MsgBox &quot;Database is Currently in Use Can&#39;t Restore&quot;, vbInformation + vbOKOnly&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;End Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;&lt;b&gt;&lt;u&gt;Backup DB compressd &amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;b&gt;(In MS SQL Server 2000) using VB6&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Below is a procedure in VB6 to take Backup of &amp;nbsp;DB in compressed format&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Private Sub cmdBackup_Click()&lt;/li&gt;
&lt;li&gt;On Error GoTo xer&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If Not FS.FolderExists(&quot;c:\backup&quot;) Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;FS.CreateFolder &quot;c:\backup&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;If Dir(&quot;c:\backup\Tmp&quot;, vbDirectory) &amp;lt;&amp;gt; &quot;&quot; Then FS.DeleteFolder &quot;c:\backup\Tmp&quot;&lt;/li&gt;
&lt;li&gt;MkDir &quot;c:\backup\tmp&quot;&lt;/li&gt;
&lt;li&gt;cur_data = Me.ListView1.SelectedItem.SubItems(2)&lt;/li&gt;
&lt;li&gt;Me.ProgressBar1.Value = 10&lt;/li&gt;
&lt;li&gt;cstr1 = GServer.GCON.ConnectionString&lt;/li&gt;
&lt;li&gt;If GServer.GCON.STATE = 1 Then GServer.GCON.Close&lt;/li&gt;
&lt;li&gt;cstr2 = GServer.GXCON.ConnectionString&lt;/li&gt;
&lt;li&gt;If GServer.GXCON.STATE = 1 Then GServer.GXCON.Close&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;GServer.ConnectXDB gsvrname, guname, gpwd, &quot;master&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;If Cn.STATE = 1 Then Cn.Close&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Cn.ConnectionString = GServer.GXCON.ConnectionString&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Cn.Open&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Cn.Execute &quot;backup database &quot; &amp;amp; cur_data &amp;amp; &quot; to disk =&#39;C:\Backup\Tmp\&quot; &amp;amp; cur_data &amp;amp; &quot;_Backup&quot; &amp;amp; &quot;.bak&#39;&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Me.ecCompress1.FileName = &quot;C:\Backup\&quot; &amp;amp; cur_data &amp;amp; &quot;_Backup&quot; &amp;amp; &quot;.cab&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Me.ecCompress1.Files.Add &quot;C:\Backup\tmp\&quot; &amp;amp; cur_data &amp;amp; &quot;_Backup&quot; &amp;amp; &quot;.bak&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;CheckSpace&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Me.ecCompress1.Compress&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;If MsgBox(&quot;Backup Completed Successfuly&quot;, vbOKOnly) = vbOK Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;FS.DeleteFolder &quot;c:\backup\tmp&quot;&lt;/li&gt;
&lt;li&gt;GServer.GCON.ConnectionString = cstr1&lt;/li&gt;
&lt;li&gt;GServer.GCON.Open&lt;/li&gt;
&lt;li&gt;GServer.GXCON.ConnectionString = cstr2&lt;/li&gt;
&lt;li&gt;GServer.GXCON.Open&lt;/li&gt;
&lt;li&gt;If Cn.STATE = 1 Then Cn.Close&lt;/li&gt;
&lt;li&gt;Unload Me&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Unload Me&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;If Cn.STATE = 1 Then Cn.Close&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;xer:&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If Err.Number = -2147217900 Or Err.Number &amp;lt;&amp;gt; 0 Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Resume Next&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;MsgBoxEx &quot;Problem Exist Please Contact RNT COMPUTER SOLUTIONS (P) LTD.&quot;, 0, 0, BottomRight, vbCritical + vbOKOnly&lt;/li&gt;
&lt;li&gt;Resume Next&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;&lt;u&gt;&lt;b&gt;Restore DB compressd&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;b&gt;(In MS SQL Server 2000) using VB6&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Below is a procedure in VB6 to Restore Backup of &amp;nbsp;DB taken above in compressed format&lt;/li&gt;
&lt;li&gt;Private Sub RestoreBackup(DRV As Variant)&lt;/li&gt;
&lt;li&gt;On Error GoTo er&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If Dir(&quot;c:\backup\Tmp&quot;, vbDirectory) &amp;lt;&amp;gt; &quot;&quot; Then FS.DeleteFolder &quot;c:\backup\Tmp&quot;&lt;/li&gt;
&lt;li&gt;MkDir &quot;c:\backup\tmp&quot;&lt;/li&gt;
&lt;li&gt;Me.ProgressBar2.Visible = True&lt;/li&gt;
&lt;li&gt;If Dir(&quot;C:\backup\&quot; &amp;amp; Me.ListView2.SelectedItem.SubItems(2) &amp;amp; &quot;_Backup.cab&quot;, vbNormal) &amp;lt;&amp;gt; &quot;&quot; Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Me.ecExtract1.FileName = &quot;c:\backup\&quot; &amp;amp; Trim(Me.ListView2.SelectedItem.SubItems(2) &amp;amp; &quot;_backup.cab&quot;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Me.ecExtract1.Files.SelectAll&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Me.ecExtract1.ExtractAll &quot;c:\backup\Tmp\&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;cstr1 = GServer.GCON.ConnectionString&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;If GServer.GCON.STATE = 1 Then GServer.GCON.Close&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;cstr2 = GServer.GXCON.ConnectionString&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;If GServer.GXCON.STATE = 1 Then GServer.GXCON.Close&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;GServer.ConnectXDB gsvrname, guname, gpwd, &quot;master&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;GServer.Connect gsvrname, guname, gpwd, &quot;master&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;If Cn.STATE = 1 Then Cn.Close&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Cn.ConnectionString = GServer.GXCON.ConnectionString&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Cn.Open&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;If GServer.GCON.STATE = 1 Then GServer.GCON.Close&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;If GServer.GXCON.STATE = 1 Then GServer.GXCON.Close&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;cur_data = Me.ListView2.SelectedItem.SubItems(2)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Cn.Execute (&quot;Use Master&quot;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;Cn.Execute &quot;restore database &quot; &amp;amp; cur_data &amp;amp; &quot; From disk =&#39;C:\Backup\tmp\&quot; &amp;amp; cur_data &amp;amp; &quot;_Backup&quot; &amp;amp; &quot;.bak&#39;&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;If MsgBox(&quot;Restore Completed Successfuly&quot;, vbOKOnly) = vbOK Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;FS.DeleteFolder &quot;c:\backup\tmp&quot;&lt;/li&gt;
&lt;li&gt;GServer.GCON.ConnectionString = cstr1&lt;/li&gt;
&lt;li&gt;GServer.GCON.Open&lt;/li&gt;
&lt;li&gt;GServer.GXCON.ConnectionString = cstr2&lt;/li&gt;
&lt;li&gt;GServer.GXCON.Open&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Unload Me&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Else&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;GoTo ext&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;li&gt;If Dir(&quot;c:\backup\Tmp&quot;, vbDirectory) &amp;lt;&amp;gt; &quot;&quot; Then FS.DeleteFolder &quot;c:\backup\Tmp&quot;&lt;/li&gt;
&lt;li&gt;If Cn.STATE = 1 Then Cn.Close&lt;/li&gt;
&lt;li&gt;Unload Me&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;ext:&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;MsgBox &quot;No Backup Information For &#39;&quot; &amp;amp; Me.ListView2.SelectedItem.Text &amp;amp; &quot;&#39; Company Please Insert Another Disk&quot;, vbInformation + vbOKOnly, &quot;Eh!&quot;&lt;/li&gt;
&lt;li&gt;Exit Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;er:&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;MsgBox Err.Description, vbCritical + vbOKOnly, &quot;Eh!&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End If&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;End Sub&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;List of databases&amp;nbsp;&lt;/b&gt;(In MS SQL Server 2000)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Use Master ; SELECT * FROM SYSDATABASES&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Attach a database with user defined location but within same computer i.e. location must not be in network&lt;/span&gt;&amp;nbsp;&lt;/b&gt;(In MS SQL Server 2000)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;use master ; EXEC sp_attach_db @dbname = &#39;TEMPCure&#39;,&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;&amp;nbsp;@filename1 = &#39;c:\Temp2\TEMPCure.mdf&#39;,&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;@filename2 = &#39;c:\Temp2\TEMPCure_log.ldf&#39;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange;&quot;&gt;Deattach a database from the server (In MS SQL Server 2000)&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;EXEC sp_detach_db &#39;TEMPCure&#39;, &#39;true&#39;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;Convert a Column Value from &quot;Male&quot; to &quot;Female&quot; &amp;amp; &quot;Female&quot; to &quot;Male&quot; &amp;amp; leave rest as it is in single query&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;u&gt;Its very simple If one know USE of &quot;CASE&quot; stmnt in SQL Query &lt;/u&gt;(&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;Its very important as I am unable to clear one of my interview due to lack of its knowledge&lt;/span&gt;)&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;E.g&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Ist of all I create a temporary table for testing &amp;amp; below are some useful Queries along with main query&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;use ArunDatabase1&lt;/li&gt;
&lt;li&gt;create table temp1(sno int Primary Key Identity, sex nvarchar(10) null)&lt;/li&gt;
&lt;li&gt;select * from temp1&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Add new column in the existing table&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;alter table temp1 add Age int null&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Insert Multiple rows in one query-&amp;gt;1st method use ; 2nd method-&amp;gt; use below&amp;nbsp;&lt;/b&gt;UNION ALL and INSERT INTO … SELECT… clauses.&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;INSERT INTO Temp1(Sex,age)&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT &#39;Male&#39;,20&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;UNION ALL&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT &#39;Female&#39;,25&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;UNION ALL&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT &#39;Female&#39;,30&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;UNION ALL&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT &#39;Male&#39;,40&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;UPDATE Temp1 SET&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Sex=&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CASE&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;WHEN sex=&#39;Male&#39;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;THEN &#39;Female&#39;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;WHEN sex=&#39;Female&#39;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;THEN &#39;Male&#39;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;ELSE Sex&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;END,&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Age=&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CASE&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;WHEN Age&amp;gt;35 THEN Age+3&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;WHEN Age&amp;lt;25 THEN Age+2&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;WHEN Age IS NULL THEN 20&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;ELSE AGE&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;END&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Below are some more Useful examples to make the use of Case statement more clearer&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;E.g 1&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;SELECT title, price,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Budget = CASE price&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN price &amp;gt; 20.00 THEN &#39;Expensive&#39;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN price BETWEEN 10.00 AND 19.99 THEN &#39;Moderate&#39;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN price &amp;lt; 10.00 THEN &#39;Inexpensive&#39;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ELSE &#39;Unknown&#39;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END,&lt;/li&gt;
&lt;li&gt;FROM titles&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;below query give same result as above one&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;SELECT title, price, &#39;Expensive&#39;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;FROM titles&lt;/li&gt;
&lt;li&gt;WHERE price &amp;gt; 20.00&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;UNION ALL&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;SELECT title, price, &#39;Moderate&#39;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;FROM titles&lt;/li&gt;
&lt;li&gt;WHERE price BETWEEN 10.00 AND 19.99&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;UNION ALL&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;SELECT title, price, &#39;Inexpensive&#39;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;FROM titles&lt;/li&gt;
&lt;li&gt;WHERE price &amp;lt; 10.00&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;UNION ALL&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;SELECT title, price, &#39;Unknown&#39;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;FROM titles&lt;/li&gt;
&lt;li&gt;WHERE price IS NULL&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;E.g 2&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Before using below query I create a table to execute below queries&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;CREATE TABLE prodsales&lt;/li&gt;
&lt;li&gt;&amp;nbsp;(product char(3),&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;mnth &amp;nbsp; &amp;nbsp;smallint,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;sales &amp;nbsp; money)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Now queries using above created tables are as below&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;SELECT product,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 1 THEN sales ELSE NULL END) AS jan,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 2 THEN sales ELSE NULL END) AS feb,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 3 THEN sales ELSE NULL END) AS mar,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 4 THEN sales ELSE NULL END) AS apr,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 5 THEN sales ELSE NULL END) AS may,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 6 THEN sales ELSE NULL END) AS jun,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 7 THEN sales ELSE NULL END) AS jul,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 8 THEN sales ELSE NULL END) AS aug,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 9 THEN sales ELSE NULL END) AS sep,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 10 THEN sales ELSE NULL END) AS oct,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 11 THEN sales ELSE NULL END) AS nov,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE mnth WHEN 12 THEN sales ELSE NULL END) AS dec&lt;/li&gt;
&lt;li&gt;FROM prodsales&lt;/li&gt;
&lt;li&gt;GROUP BY product&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;E.g 3&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;SELECT product,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE WHEN mth BETWEEN 1 AND 3 THEN sales&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;ELSE NULL END) AS q1,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE WHEN mth BETWEEN 4 AND 6 THEN sales&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;ELSE NULL END) AS q2,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE WHEN mth BETWEEN 7 AND 9 THEN sales&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;ELSE NULL END) AS q3,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp;SUM(CASE WHEN mth BETWEEN 10 AND 12 THEN sales&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;ELSE NULL END) AS q4&lt;/li&gt;
&lt;li&gt;FROM prodsales&lt;/li&gt;
&lt;li&gt;GROUP BY product&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;E.g 4&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;SELECT au_lname, au_fname, title, Category =&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CASE&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN (SELECT AVG(royaltyper) FROM titleauthor ta&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE t.title_id = ta.title_id) &amp;gt; 65&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; THEN &#39;Very High&#39;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN (SELECT AVG(royaltyper) FROM titleauthor ta&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE t.title_id = ta.title_id)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BETWEEN 55 and 64&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; THEN &#39;High&#39;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN (SELECT AVG(royaltyper) FROM titleauthor ta&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE t.title_id = ta.title_id)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BETWEEN 41 and 54&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; THEN &#39;Moderate&#39;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ELSE &#39;Low&#39;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;/li&gt;
&lt;li&gt;FROM authors a,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; titles t,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; titleauthor ta&lt;/li&gt;
&lt;li&gt;WHERE a.au_id = ta.au_id&lt;/li&gt;
&lt;li&gt;AND &amp;nbsp; ta.title_id = t.title_id&lt;/li&gt;
&lt;li&gt;ORDER BY Category, au_lname, au_fname&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Below query find 2nd Lowest age but if there is duplicacy then it gives wrong result&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;SELECT TOP 1 Age FROM&lt;/li&gt;
&lt;li&gt;&amp;nbsp;(SELECT TOP 2 Age FROM Temp1 ORDER BY Age ASC) AS SeconLowestAge&lt;/li&gt;
&lt;li&gt;&amp;nbsp;ORDER BY Age DESC&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Below query find 2nd Lowest age but if there is duplicacy then also it gives correct result&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;SELECT TOP 1 Age FROM&lt;/li&gt;
&lt;li&gt;&amp;nbsp;(SELECT TOP 2 Age FROM&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; (SELECT DISTINCT Age FROM Temp1) AS T1&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;ORDER BY Age ASC) AS SeconLowestAge&lt;/li&gt;
&lt;li&gt;&amp;nbsp;ORDER BY Age DESC&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: magenta;&quot;&gt;Above queries run well in SQL Server 2000, but in SQL Server2005, you can&#39;t use Order by clause in the subquery, so these would not work there.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;Below query find nth highest age using Joins&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Note: here let n=5 to find 5th highest age for table&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;CREATE TABLE temp1&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;&amp;nbsp;sno INT PRIMARY KEY IDENTITY,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;sex NVARCHAR(10) NULL,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;age INT NULL&lt;/li&gt;
&lt;li&gt;)&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;select * from temp1 t1&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;where 5-1=(select count(distinct age) from temp1 t2&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: red; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;where t2.age&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;t1.age)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;Below query find nth Lowest age using Joins&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;Note: here let n=5 to find 5th Lowest age for table&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;select * from temp1 t1&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;where 5-1=(select count(distinct age) from temp1 t2&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;color: red; white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;where t2.age&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt; t1.age)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;fill table from another table&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;create table temp2&lt;/li&gt;
&lt;li&gt;(&lt;/li&gt;
&lt;li&gt;id int identity not null,&lt;/li&gt;
&lt;li&gt;&amp;nbsp;myName nvarchar(20)&lt;/li&gt;
&lt;li&gt;&amp;nbsp;)&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;insert into temp2(myName)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;select sex from temp1&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: orange; font-size: large;&quot;&gt;Make SQL Query to get columns from diff small queries as diff column names&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;select (select ReceiptId from FeeReceiptMain where ReceiptNo=&#39;REC-1&#39;) as FromFeeId, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(select ReceiptId from FeeReceiptMain where ReceiptNo=&#39;REC-10&#39;) as ToFeeId&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I hope it will help those who wish to make quick revision of sql. &lt;b&gt;&lt;u&gt;Please forgive me if I made any mistake&lt;/u&gt;&lt;/b&gt;.&amp;nbsp;I made these notes keeping my habit of revising a topic &amp;amp; &lt;b&gt;due to lack of time &amp;amp; length of this blog, I don&#39;t add many comments to explain it. Its just notes for quick revision not for any fresher.&lt;/b&gt; Of course, there are lots of topic left in it but its just the overview of some of the main topics which are used most frequently.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;I keeps on updating it as I get time &amp;amp; would like &amp;amp; appreciate your comments to improve it.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/2705808004808431275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2010/10/quickly-revise-sql-used-in-many-popular.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/2705808004808431275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/2705808004808431275'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2010/10/quickly-revise-sql-used-in-many-popular.html' title='Quickly Revise SQL used in many popular  RDBMS Databases'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-8580401715970323186</id><published>2010-09-30T22:35:00.000-07:00</published><updated>2010-10-01T00:18:12.926-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Computer Course"/><category scheme="http://www.blogger.com/atom/ns#" term="Computer Learning"/><category scheme="http://www.blogger.com/atom/ns#" term="Easiest way to Learn computer"/><title type='text'>Basic Computer Course to be good in Microsoft Computers</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Ram Ram Friends&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I made following notes while teaching Computer Basics at a computer&amp;nbsp;institute as I have no syllabus offered to teach, but based on my capability at that time, I made these notes.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Computer Basics&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Contents:-&lt;/span&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;1 Computer Fundamentals&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2 Windows&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3 Paint&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;4 Notepad&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;5 Word Pad&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;6 M S Word&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;7 M S Excel&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;8 M S Power Point&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;9 Internet&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;1 Computer Fundamentals&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Contents:-&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
1 Computer&lt;br /&gt;
2  Strength of Computer&lt;br /&gt;
3 Weakness of Computer&lt;br /&gt;
4 Functioning of Computer (I-P-O Cycle)&lt;br /&gt;
5  Input Devices&lt;br /&gt;
6  Output Devices&lt;br /&gt;
7  CPU&lt;br /&gt;
8  Memory &amp;amp;its type&lt;br /&gt;
9  Hierarchy of memory storage media&lt;br /&gt;
10  Storing Method in different storage media&lt;br /&gt;
11   Unit of Memory&lt;br /&gt;
12 Storing Capacity of various memory devices&lt;br /&gt;
13 H/W &amp;amp; S/W&lt;br /&gt;
14 Types of S/W&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;2 Windows&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Contents:-&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;1 Hard disk &amp;amp; its Partition&lt;br /&gt;
2 drive, folder, &amp;amp; file&lt;br /&gt;
3 File Address &amp;amp; its hierarchy&lt;br /&gt;
4 Creating Folders, Deleting files&lt;br /&gt;
5 Cut, Copy &amp;amp; Paste files, folders among folders, drives.&lt;br /&gt;
6 GUI &amp;amp; CUI&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;1 Computer Fundamentals&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;1 &lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Computer -&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;A computer is an electronic device that can perform a variety of operations in accordance with a set of instructions called programs.&lt;br /&gt;
&lt;br /&gt;
Computer takes some order (input) then perform (process) the task to complete the order &amp;amp; give result (output).&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;2&lt;/span&gt;  &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Strength of Computer -&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;A. Speed -&amp;gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;B. High storage capacity -&amp;gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;C. Accuracy -&amp;gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;D. Reliability -&amp;gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;E. Versatility -&amp;gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1. Repetitive jobs&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2. Hazardous jobs&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;3 &lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Weakness of Computer -&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Zero IQ&lt;/li&gt;
&lt;li&gt;Lack of Decision making power&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIUcrbGoUtRBnXpgiaHsNa0iYn6XSKRaApPolCCDB0JbXAlQrcHEXQGjSS_JJkLdOUBcYItwTuT8c9bezExBbrEgv60tZwPSnIGJ9bzNGglCLf7MhsCs9zbcf5cEbRbT16D7RGqKM37Ns/s1600/Computer+IPO+Cycle.JPG&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5522688049055439362&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIUcrbGoUtRBnXpgiaHsNa0iYn6XSKRaApPolCCDB0JbXAlQrcHEXQGjSS_JJkLdOUBcYItwTuT8c9bezExBbrEgv60tZwPSnIGJ9bzNGglCLf7MhsCs9zbcf5cEbRbT16D7RGqKM37Ns/s1600/Computer+IPO+Cycle.JPG&quot; style=&quot;display: block; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;5  &lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Input Devices -&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
These are the machines, which are used to give input (order) to the computer.&lt;br /&gt;
&lt;br /&gt;
Following are the various kinds of input devices: -&lt;br /&gt;
1. Keyboard&lt;br /&gt;
2. Mouse&lt;br /&gt;
3. Mike&lt;br /&gt;
4. Web Camera&lt;br /&gt;
5. Joystick&lt;br /&gt;
6. Scanner&lt;br /&gt;
7. Light-pen&lt;br /&gt;
8. Track ball&lt;br /&gt;
9. MICR (Magnetic Ink Character Recognition)&lt;br /&gt;
10. OMR (Optical Mark Recognition)&lt;br /&gt;
11. OCR (Optical Character Recognition)&lt;br /&gt;
12. Touch screen&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;6  Output Devices -&amp;gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
These are the machines, which are used to display output (result) from the computer.&lt;br /&gt;
&lt;br /&gt;
Following are the various kinds of output devices: -&lt;br /&gt;
1.  VDU (Visual Display Unit) / Monitor&lt;br /&gt;
2.  Speakers&lt;br /&gt;
3.  Printers&lt;br /&gt;
4.  Plotters&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;7.  C P U (Central Processing Unit ) -&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
CPU has two parts&lt;br /&gt;
1. ALU (Arithmetic &amp;amp; Logical Unit)&lt;br /&gt;
2. CU (Control Unit)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. ALU (Arithmetic &amp;amp; Logical Unit) -&amp;gt;&lt;/b&gt;&lt;br /&gt;
It has two parts&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;A.  Arithmetic Unit -&amp;gt;&lt;/b&gt;&lt;/span&gt; It is used to perform the arithmetic operations like&lt;br /&gt;
&lt;br /&gt;
Addition (+)&lt;br /&gt;
Subtraction (-)&lt;br /&gt;
Multiplication (*)&lt;br /&gt;
Division (/)&lt;br /&gt;
It also perform comparison operations like&lt;br /&gt;
Equal (=)&lt;br /&gt;
Less than (&amp;lt;) Less than or equal to (&amp;lt;=) Greater than (&amp;gt;)&lt;br /&gt;
Greater than or equal to (&amp;gt;=)&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;B. Logical Unit -&amp;gt;&lt;/b&gt;&lt;/span&gt; It is used to perform the logical operations like&lt;br /&gt;
&lt;br /&gt;
AND&lt;br /&gt;
OR&lt;br /&gt;
NOT&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;2. CU (Control Unit)&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&amp;nbsp;-&amp;gt;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;It controls the flow of operations and instructions . i.e. it controls which instruction will be executed first &amp;amp; which instruction will follow it etc.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;8. Memory &amp;amp;its type -&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Memory -&amp;gt;&lt;/b&gt;&lt;/span&gt; It is used for storing both instructions and data.&lt;br /&gt;
&lt;br /&gt;
There are &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;two kinds of memory&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;a.  Primary memory/Main memory/Memory/volatile memory -&amp;gt;&lt;/b&gt;&lt;br /&gt;
It can store data &amp;amp; instructions in it till the electricity is on or till the system (computer) is on.&lt;br /&gt;
&lt;br /&gt;
Once the computer is turned off (shut down) , then all the data stored in it , will be deleted automatically &amp;amp; we can&#39;t get that data again, because it is permanently removed from the memory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;b.   Secondary memory/non-volatile    memory/ Storage media/ Permanent memory -&amp;gt;&lt;/b&gt;&lt;br /&gt;
It can store data in it in both situations like when the computer is on &amp;amp; when the computer is off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;9 Hierarchy of memory storage media&lt;/b&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Memory&lt;/li&gt;

&lt;ol&gt;&lt;li&gt;Primary Memory&lt;/li&gt;

&lt;ol&gt;&lt;li&gt;RAM (Ramdom Access Memory)&lt;/li&gt;
&lt;li&gt;ROM (Read Only Memory)&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;Secondary Memory&lt;/li&gt;

&lt;ol&gt;&lt;li&gt;Magnetic Media&lt;/li&gt;

&lt;ol&gt;&lt;li&gt;Floppy&lt;/li&gt;
&lt;li&gt;Hard Disk&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;Optical Media&lt;/li&gt;

&lt;ol&gt;&lt;li&gt;CD (Compact Disk)&lt;/li&gt;
&lt;li&gt;DVD (Digital Versatile/Video Disk)&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;IC (Chip) Media&lt;/li&gt;

&lt;ol&gt;&lt;li&gt;Pen Drive&lt;/li&gt;
&lt;li&gt;Flash Drive&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;br /&gt;
10  Storing Method in different storage media&lt;br /&gt;
11   Unit of Memory&lt;br /&gt;
12 Storing Capacity of various memory devices&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Unit of memory:-&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
1Bit=    1 or 0&lt;br /&gt;
1 Byte =  8 bits= 1 character&lt;br /&gt;
1 KB (Kio Byte) = 2^10 Bytes= 1024 Bytes= 1000 Bytes nearly&lt;br /&gt;
1MB (Mega Byte) = 2^10 KB= 1024 KB &lt;br /&gt;
1 GB (Giga Byte) = 2^10 MB&lt;br /&gt;
1 TB (Tera Byte) = 2^10 GB&lt;br /&gt;
Note: 2^10 means 2 raise to the power 10&lt;br /&gt;
&lt;br /&gt;
1 floppy = 1.44 MB&lt;br /&gt;
1 RAM = 32 MB, 64 MB, 128 MB, 256 MB, 512 MB&lt;br /&gt;
1 CD = 700 MB&lt;br /&gt;
1 DVD = 4 GB to  17 GB&lt;br /&gt;
1 Hard Disk (HD) =  5 GB,10 GB, 20 GB, 40 GB, 80 GB,160 GB, 250 GB, 500 GB,1TB etc&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Internet-&amp;gt;&lt;/b&gt;&lt;/span&gt; Network of network&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Network -&amp;gt;&lt;/b&gt;&lt;/span&gt; a collection of more than one computer so that they can communicate with each other i.e. they can exchange information or files &amp;amp; folders with each other &lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Modem =&amp;gt;&lt;/b&gt;&lt;/span&gt;It is a machine which do modulation &amp;amp; demodulation&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Mo=Modulation-&amp;gt;&lt;/b&gt;&lt;/span&gt;Conversion of analog form of data into digital form of data&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Dem=Demodulation-&amp;gt;&lt;/b&gt;&lt;/span&gt; Conversion of  digital form of data into analog form of data&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Analog form of data -&amp;gt;&lt;/b&gt;&lt;/span&gt; Data present in telephone line&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Digital form of data -&amp;gt;&lt;/span&gt;&lt;/b&gt; data present in computer etc.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Functioning of internet -&amp;gt;&lt;/b&gt;&lt;/span&gt; Internet is working with the help of hypertext. &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Hypertext&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&amp;nbsp;-&amp;gt;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;It is a text/word/small line , written in blue color,&amp;amp; underline, &amp;amp; when mouse pointer is come over it then it gain the shape of a hand which point something with index finger.&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;Hypertext&lt;/span&gt;&lt;/b&gt; work by &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;HYPERLINK&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
i.e. when we click on hypertext then it open a new page &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;ISP -&amp;gt;&lt;/b&gt;&lt;/span&gt;Internet Service Provider&lt;br /&gt;
e.g.  VSNL, Satyam  &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;websites&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Home page&lt;/b&gt;&lt;/span&gt; – first page of any website&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;public website -&amp;gt;&lt;/b&gt;&lt;/span&gt; Provide free  ‘e- mail’ facility&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;http =&amp;gt;&lt;/b&gt;&lt;/span&gt; Hyper Text Transfer Protocol (rules)&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;www &lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;=&amp;gt;&lt;/b&gt;&lt;/span&gt;World Wide Web&lt;br /&gt;
e.g.&lt;br /&gt;
http://www.yahoo.com&lt;br /&gt;
http://www.google.com&lt;br /&gt;
http://www.rediff.com&lt;br /&gt;
http://www.rediffmail.com&lt;br /&gt;
http://www.indiatimes.com&lt;br /&gt;
http://www.jagran.com&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;private website :-&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
http://www.nokia.com&lt;br /&gt;
http://www.cbse.co.in&lt;br /&gt;
http://www.mtnl.co.in&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;e-mail (Electronic Mail) -&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To send or receive messages across the world.&lt;br /&gt;
For this You must have an address known as e-mail address.&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;b&gt;arunkakkar1@gmail.com&lt;br /&gt;
arunkakkar1@yahoo.com&lt;br /&gt;
arunkakkar1@hotmail.com&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
Difference between - (hyphen or minus or dash) &amp;amp; _ (underscore)&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;a-k (hyphen) &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;read as &quot;a hyphen k&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;a_k (underscore) &lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;read as &quot;a underscore k&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Its just the basic computer course, After learning it, you are open &amp;amp; of course ready to face the world of computing with lots of confidence.</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/8580401715970323186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2010/09/basic-computer-course-to-be-good-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/8580401715970323186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/8580401715970323186'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2010/09/basic-computer-course-to-be-good-in.html' title='Basic Computer Course to be good in Microsoft Computers'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIUcrbGoUtRBnXpgiaHsNa0iYn6XSKRaApPolCCDB0JbXAlQrcHEXQGjSS_JJkLdOUBcYItwTuT8c9bezExBbrEgv60tZwPSnIGJ9bzNGglCLf7MhsCs9zbcf5cEbRbT16D7RGqKM37Ns/s72-c/Computer+IPO+Cycle.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-8292515853480313512</id><published>2010-08-04T01:57:00.000-07:00</published><updated>2010-08-04T02:04:38.311-07:00</updated><title type='text'>My TimePass</title><content type='html'>Its very difficult to pass time if you don&#39;t have atleast one kind of passion.&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/8292515853480313512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2010/08/my-timepass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/8292515853480313512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/8292515853480313512'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2010/08/my-timepass.html' title='My TimePass'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8813727818834904994.post-1423997439849138042</id><published>2010-04-08T22:48:00.000-07:00</published><updated>2010-04-08T23:01:40.452-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dot Net as whole vs  by many institutes"/><title type='text'>Dot Net as whole vs  by many institutes</title><content type='html'>Hi Friends&lt;br /&gt;  Most of us hear about dot net from various institutes.&lt;br /&gt;Almost all computer institutes claim to teach complete dot net, but I found most of them are fraud since they teach only very small portion of dot net.&lt;br /&gt;&lt;br /&gt;Whole dot net have many tools&lt;br /&gt; But I am paying more focus only on programming tools.&lt;br /&gt;As per my knowledge, dot net has following programming tools&lt;br /&gt;1 vb.net&lt;br /&gt;2 C#.net&lt;br /&gt;3 V C++&lt;br /&gt;&lt;br /&gt;And for web development both vb.net &amp;amp; c#.net are used with asp.net as server site scripting language &amp;amp; java script as client site script language&lt;br /&gt;Sql server as database&lt;br /&gt;&lt;br /&gt;Most of institutes teaches only c#.net but that also to a limited level&lt;br /&gt;&lt;br /&gt;So my suggestion is that just beware of such institutes or set your mind before joining them.&lt;br /&gt;&lt;br /&gt;Wish a best of luck for new software/web developers</content><link rel='replies' type='application/atom+xml' href='http://arunkakkar1.blogspot.com/feeds/1423997439849138042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://arunkakkar1.blogspot.com/2010/04/dot-net-as-whole-vs-by-many-institutes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/1423997439849138042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8813727818834904994/posts/default/1423997439849138042'/><link rel='alternate' type='text/html' href='http://arunkakkar1.blogspot.com/2010/04/dot-net-as-whole-vs-by-many-institutes.html' title='Dot Net as whole vs  by many institutes'/><author><name>Arun Kakkar</name><uri>http://www.blogger.com/profile/18000554390888136613</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNyxg3I6m8ZNG8ISuzHS5MgK6-KtTi5g1sV4oPtZDRFQJV8fau1fOOrEj6MX0B6IjuacVQ-UHBpNzNvNJqms3mIAc99ckVUsjjTjM1OllnbHrX8551eZcMcFKp6cPhw_Q/s220/Arun+Kakkar+02Mar2014.jpg'/></author><thr:total>0</thr:total></entry></feed>