<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Knowledge ATM</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/dhejo_vanissery/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/dhejo_vanissery/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:49:00 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>SQL Server 2005 Mobile edition --&gt; SQL Server 2005 Everywhere --&gt; SQL Server 2005 Everywhere--&gt;SQL Server 2005 Compact Edition</title>
      <link>https://docs.microsoft.com/archive/blogs/dhejo_vanissery/sql-server-2005-mobile-edition-sql-server-2005-everywhere-sql-server-2005-everywhere-sql-server-2005-compact-edition</link>
      <pubDate>Mon, 08 Oct 2007 08:02:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dhejo_vanissery/2007/10/08/sql-server-2005-mobile-edition-sql-server-2005-everywhere-sql-server-2005-everywhere-sql-server-2005-compact-edition/</guid>
      <description><![CDATA[SQL Server 2005 Mobile edition
SQL Server 2005 Compact Edition
SQL Server 2005...]]></description>
      <content:encoded><![CDATA[<FONT face=Calibri><FONT face=Calibri><FONT face=Calibri>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3>SQL Server 2005 Mobile edition</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3>SQL Server 2005 Compact Edition</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3>SQL Server 2005 Everywhere</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><B>What are they and how are they different</B>….These are all almost same…<SPAN style="FONT-FAMILY: Wingdings">J</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3>Actually first came Mobile Edition…then MS changed the License policy allowing it to be used everywhere it was named as&nbsp;t EveryWhere…then during the CTP partners complained that the name is confusing so they changed it to Compact Edition…..I was so confused among them…so planned to dig into the story….I don’t want you to wander in the wilderness ….so shared the info…</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3>Now if you here <B>SQL Server Compact Edition RTW</B> (Release to web) don’t worry….it is just the next version around the corner….end of December or mid January.</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt" mce_keep="true">&nbsp;</P></FONT></FONT></FONT>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server Compact Edition and Visual Studio</title>
      <link>https://docs.microsoft.com/archive/blogs/dhejo_vanissery/sql-server-compact-edition-and-visual-studio</link>
      <pubDate>Sat, 06 Oct 2007 03:26:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dhejo_vanissery/2007/10/06/sql-server-compact-edition-and-visual-studio/</guid>
      <description><![CDATA[Let me start with a brief description of what SQL Server Compact Edition is and something about its...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">Let me start with a brief description of what SQL Server Compact Edition is and something about its internals.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">SQL Server Compact Edition is a file-based database that consists of seven DLLs that are approximately 1.4 MB and does not run as a service to keep the footprint low. When you create a SQL Server Compact Edition database it is saved as .SDF file and SQL Server Compact Edition only save one database per file. This feature helps in managing concurrent access and locking. SQL Server CE also supports multiple connections but limit is 256 connections. One other limitation which might be very crucial if you are using it on devices is the size limit. Max size that SQL Server CE is 4GB.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">If you have used SQL Server CE you would have noticed that the connection string is the path to the .sdf file what does that mean. This is because as I earlier said it is file-based database.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">To use SQL Server Compact Edition&nbsp;with Visual Studio, you must install both the SQL Server Compact Edition&nbsp;runtime and the SQL Server Compact Edition&nbsp;Tools for Visual Studio.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">SQL Server Compact Edition&nbsp;now supports the Data Directory macro when connection is established using SqlCeConnection object. What does that mean and how does it affect me as developer. First let me explain what it means by Data Directory Macro. It means that instead of specifying the entire file path you can use |DataDirectory|\DatabaseName.sdf and it will get resolved automatically. But let me tell you this is followed when the deployment model you are using is private-filed deployment (deployed a part of the project).<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">Now this is the interesting part. Visual Studio uses this model to deploy your application into the emulator.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">Visual Studio creates a copy of the .sdf file each time you build your application and dumps it into the build folder as it uses Data Directory macro to access the file it gets resolved every time. You might have connected to the source database file i.e. the file you included into the project and when you run the application VS will be using the one in the build folder. So if you run insert command form your application and check your source database to see the new rows added you would not find them there.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">So don’t think that your INSERT statement did not work just check the copy in the build folder and you will find the new added rows. </SPAN></P>]]></content:encoded>
    </item>
    <item>
      <title>Recursively listing the files</title>
      <link>https://docs.microsoft.com/archive/blogs/dhejo_vanissery/recursively-listing-the-files</link>
      <pubDate>Mon, 10 Sep 2007 18:17:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dhejo_vanissery/2007/09/10/recursively-listing-the-files/</guid>
      <description><![CDATA[This function will help you to list all the files with the specified extension recursively i.e. it...]]></description>
      <content:encoded><![CDATA[<P>This function will help you to list all the files with the specified extension recursively i.e. it will also list the files within the child directory.</P><FONT color=#0000ff size=2>
<P>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> BuildList(</FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> searchPath, </FONT><FONT color=#0000ff size=2>bool</FONT><FONT size=2> recursive, </FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> ext, <FONT color=#2b91af size=2>ArrayList</FONT><FONT size=2> files</FONT>)</P>
<P>{</P>
<P mce_keep="true">&nbsp;</P>
<P></FONT><FONT color=#2b91af size=2>DirectoryInfo</FONT><FONT size=2> parentDir = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>DirectoryInfo</FONT><FONT size=2>(searchPath);</P>
<P></FONT><FONT color=#2b91af size=2>DirectoryInfo</FONT><FONT size=2>[] children = parentDir.GetDirectories();</P>
<P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (recursive &amp;&amp; children.Length &gt; 1)</P>
<P>{</P>
<P></FONT><FONT color=#0000ff size=2>foreach</FONT><FONT size=2> (</FONT><FONT color=#2b91af size=2>DirectoryInfo</FONT><FONT size=2> Child </FONT><FONT color=#0000ff size=2>in</FONT><FONT size=2> children)</P>
<P>{</P>
<P>BuildList(Child.FullName, recursive,ext,files);</P>
<P>}</P>
<P>}</P>
<P></FONT><FONT color=#2b91af size=2>FileInfo</FONT><FONT size=2>[] fileList = parentDir.GetFiles(ext);</P>
<P></FONT><FONT color=#0000ff size=2>foreach</FONT><FONT size=2> (</FONT><FONT color=#2b91af size=2>FileInfo</FONT><FONT size=2> file </FONT><FONT color=#0000ff size=2>in</FONT><FONT size=2> fileList)</P>
<P>{</P>
<P>files.Add(file.FullName);</P>
<P>}</P>
<P>}</P></FONT>]]></content:encoded>
    </item>
    <item>
      <title>Easy way to create a connection string</title>
      <link>https://docs.microsoft.com/archive/blogs/dhejo_vanissery/easy-way-to-create-a-connection-string</link>
      <pubDate>Fri, 07 Sep 2007 00:03:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dhejo_vanissery/2007/09/07/easy-way-to-create-a-connection-string/</guid>
      <description><![CDATA[I am sure you are already using one tool or other ....but I always found UDL&nbsp;file as the...]]></description>
      <content:encoded><![CDATA[<P>I am sure you are already using one tool or other ....but I always found UDL&nbsp;file as the easiest way to create a connection string.......</P>
<P>What is UDL file?</P>
<P>UDL is Universal Data Link file contains the connection information.</P>
<P>So how to create one....</P>
<P>Step 1: Right click in the folder you want to create a UDL file and select the option New and Select the option Text Document from the drop down menu.</P>
<P>Step 2: Open the text file and from the File menu select the option Save As</P>
<P>Step 3: Enter the file name as xyz.udl (choose any name you prefer but make sure the extension is .udl) </P>
<P>Step 4: Select the All Files&nbsp;option select in the Save As Type drop down below</P>
<P>Step 5: Click the Save button in the Save As dialog box</P>
<P>You can see that a new udl file is created with the name you chose. Now what....?</P>
<P>Double click the UDL file you just created...you will be provided with the Data Link Properties dialog box. </P>
<P>Set the properties according to your need... I mean the Provider, Data source, Login info and the database name..etc.</P>
<P>You can also test the connection to make sure the information you provided are correct.</P>
<P>Once the test is completed sucessfully click Ok to close the Data Link Properties dialog box.</P>
<P>Open the the UDL file in a text editor and your connection string is ready....</P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Using Tabular Data Control to display CSV files</title>
      <link>https://docs.microsoft.com/archive/blogs/dhejo_vanissery/using-tabular-data-control-to-display-csv-files</link>
      <pubDate>Thu, 06 Sep 2007 10:49:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/dhejo_vanissery/2007/09/06/using-tabular-data-control-to-display-csv-files/</guid>
      <description><![CDATA[One Easy Way to display smartly data from your excel sheet on webpage.
I was recently trying to...]]></description>
      <content:encoded><![CDATA[<P>One Easy Way to display smartly data from your excel sheet on webpage.</P>
<P>I was recently trying to display some date from and excel sheet on a webpage. <BR>Yes save as webpage is alway and option. But then the data becomes static....So how to display<BR>the data smartly I mean with paging and sorting support..One cool feature I came across was<BR>TDC or Tabular Data Control introduced my microsoft with IE 4. So what is TDC?<BR>TDC is activeX control from Microsoft. TDC is capable of displaying<BR>Let me give an example</P>
<P>Step 1: Open a text editor and copy the data below and save the text file as exceldata.txt</P>
<P>"SL","Full Name","Email","Role"<BR>"1","Rob Smith","smithr","Sales Manager"<BR>"2","Mike Williams","WilliamsM","Marketing Manager"<BR>"3","Serena Jason","jasons","Sales Executive"<BR>"4","Harry Potter","Potter","General Manager"</P>
<P><BR>Step2: open a text editor and copy the code below and save it as an html page.</P>
<P>&lt;Html&gt;<BR>&lt;head&gt;<BR>&lt;OBJECT ID="tdcEmpDetails" WIDTH=0 HEIGHT=0 <BR>CLASSID="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83" &gt;<BR>&nbsp; <BR>&nbsp; &lt;PARAM NAME="DataURL" VALUE="exceldata.txt"&gt;<BR>&nbsp; &lt;PARAM NAME="UseHeader" VALUE="true"&gt;<BR>&lt;/OBJECT&gt;<BR>&lt;/head&gt;</P>
<P>&lt;body&gt;<BR>&lt;table border=1 DATASRC="#tdcEmpDetails"&gt;<BR>&lt;tr&gt;<BR>&nbsp;&nbsp; &lt;td&gt;&lt;span datafld="SL"&gt;&lt;/span&gt;&lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td&gt;&lt;span datafld="Full Name"&gt;&lt;/span&gt;&lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td&gt;&lt;span datafld="Email"&gt;&lt;/span&gt;&lt;/td&gt;</P>
<P>&lt;/tr&gt;&nbsp; <BR>&lt;/table&gt;<BR>&lt;/body&gt;</P>
<P>&lt;/Html&gt;</P>
<P><BR>Step 3: open the html file in a browser ...I am sure you will be happy to see the result...at least I was...</P>
<P>Now this is just a static table.. then what did I mean by smartly displaying data...<BR>With TDC it is very easy to provide both paging and sort support on the displayed data...</P>
<P>Now let us take a deep dive into the TDC object model.</P>
<P><BR>To see the entire list of properties exposed by TDC please visit the following link:<BR><A href="https://msdn2.microsoft.com/en-us/library/aa360597.aspx">https://msdn2.microsoft.com/en-us/library/aa360597.aspx</A></P>
<P>To see the entire list of methods exposed by TDC please visit the following link:<BR><A href="https://msdn2.microsoft.com/en-us/library/aa360598.aspx">https://msdn2.microsoft.com/en-us/library/aa360598.aspx</A> <BR>Actually there is only one method supported by the TDC that is Reset, which is used to reload the data based on the new filter or sort setting.</P>
<P>You can easily find examples on msdn on how to apply filtering and sorting on TDC. <BR>But what is intersting is applying paging....You can use the DataPageSize property of the table tag to limit the number of rows<BR>displayed and then use firstpage, lastpage,nextpage and previouspage method to implement paging. Below is an example that will help you<BR>understand better...Not the ID field supplied to the &lt;table&gt;</P>
<P>&lt;Html&gt;<BR>&lt;head&gt;<BR>&lt;OBJECT ID="tdcEmpDetails" WIDTH=0 HEIGHT=0 <BR>CLASSID="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83" &gt;<BR>&nbsp; <BR>&nbsp; &lt;PARAM NAME="DataURL" VALUE="exceldata.txt"&gt;<BR>&nbsp; &lt;PARAM NAME="UseHeader" VALUE="true"&gt;<BR>&lt;/OBJECT&gt;<BR>&lt;/head&gt;</P>
<P>&lt;body&gt;<BR>&lt;table ID="tblEmpDetails" border=1 DATASRC="#tdcEmpDetails"&nbsp; DATAPAGESIZE=2&gt;<BR>&lt;tr&gt;<BR>&nbsp;&nbsp; &lt;td&gt;&lt;span datafld="SL"&gt;&lt;/span&gt;&lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td&gt;&lt;span datafld="Full Name"&gt;&lt;/span&gt;&lt;/td&gt;<BR>&nbsp;&nbsp; &lt;td&gt;&lt;span datafld="Email"&gt;&lt;/span&gt;&lt;/td&gt;</P>
<P>&lt;/tr&gt;&nbsp; <BR>&lt;/table&gt;</P>
<P>&nbsp;&nbsp; &lt;BUTTON ID=cmdfirstPage onclick=" tblEmpDetails.firstPage()"&gt;&amp;lt;&amp;lt;&lt;/BUTTON&gt;<BR>&nbsp;&nbsp; &lt;BUTTON ID=cmdpreviousPage onclick=" tblEmpDetails.previousPage()"&gt;&amp;lt;&lt;/BUTTON&gt;<BR>&nbsp;&nbsp; &lt;BUTTON ID=cmdnextPage onclick=" tblEmpDetails.nextPage()"&gt;&amp;gt;&lt;/BUTTON&gt;&nbsp; <BR>&nbsp;&nbsp; &lt;BUTTON ID=cmdlastPage onclick=" tblEmpDetails.lastPage()"&gt;&amp;gt;&amp;gt;&lt;/BUTTON&gt;</P>
<P>&lt;/body&gt;</P>
<P>&lt;/Html&gt;</P>
<P mce_keep="true">&nbsp;</P>
<P>One last warning...I have seen that excel misses to add double quotes around field values..make sure you add then manually...sorry about that</P>]]></content:encoded>
    </item>
  </channel>
</rss>