<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ASp.net c# sql</title>
	<atom:link href="http://helpindotnet.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://helpindotnet.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 27 Jun 2011 09:52:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='helpindotnet.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>ASp.net c# sql</title>
		<link>http://helpindotnet.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://helpindotnet.wordpress.com/osd.xml" title="ASp.net c# sql" />
	<atom:link rel='hub' href='http://helpindotnet.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Generate Structured Class from xml file</title>
		<link>http://helpindotnet.wordpress.com/2011/02/17/generate-structured-class-from-xml-file/</link>
		<comments>http://helpindotnet.wordpress.com/2011/02/17/generate-structured-class-from-xml-file/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 13:36:06 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[asp.net c#]]></category>
		<category><![CDATA[Asp.net, c#, mssql, XML]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[.cs]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[class file]]></category>
		<category><![CDATA[generate class]]></category>
		<category><![CDATA[xml to class]]></category>

		<guid isPermaLink="false">http://helpindotnet.wordpress.com/?p=29</guid>
		<description><![CDATA[Tired of writing .cs class? we can generate it see example below&#8230; I created a test.xml file &#60;test&#62; &#60;field1&#62;hi&#60;/field1&#62; &#60;field2&#62;bye&#60;/field2&#62; &#60;/test&#62; Step1: Run visual studio command promt step2: move to the folder where test.xml is saved and execute below command xsd test.xml Above command will generate xsd file based on test.xml and then execute below [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=29&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tired of writing .cs class?</p>
<p>we can generate it see example below&#8230;</p>
<p>I created a test.xml file</p>
<p>&lt;test&gt;</p>
<p>&lt;field1&gt;hi&lt;/field1&gt;</p>
<p>&lt;field2&gt;bye&lt;/field2&gt;</p>
<p>&lt;/test&gt;</p>
<p>Step1:</p>
<p>Run visual studio command promt</p>
<p>step2: move to the folder where test.xml is saved and execute below command</p>
<p>xsd test.xml</p>
<p>Above command will generate xsd file based on test.xml</p>
<p>and then execute below command to generate the .cs file</p>
<p>xsd /c test.xsd</p>
<p>Done.</p>
<p>You can easily generate .cs file from xml file.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Now</p>
<p>&nbsp;</p>
<br />Filed under: <a href='http://helpindotnet.wordpress.com/category/aspnet-c/'>asp.net c#</a>, <a href='http://helpindotnet.wordpress.com/category/aspnet-c-mssql-xml/'>Asp.net, c#, mssql, XML</a>, <a href='http://helpindotnet.wordpress.com/category/aspnet-c-mssql-xml/xml-aspnet-c-mssql-xml/'>xml</a> Tagged: <a href='http://helpindotnet.wordpress.com/tag/cs/'>.cs</a>, <a href='http://helpindotnet.wordpress.com/tag/class/'>class</a>, <a href='http://helpindotnet.wordpress.com/tag/class-file/'>class file</a>, <a href='http://helpindotnet.wordpress.com/tag/generate-class/'>generate class</a>, <a href='http://helpindotnet.wordpress.com/tag/xml/'>xml</a>, <a href='http://helpindotnet.wordpress.com/tag/xml-to-class/'>xml to class</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/helpindotnet.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/helpindotnet.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/helpindotnet.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/helpindotnet.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/helpindotnet.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/helpindotnet.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/helpindotnet.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/helpindotnet.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/helpindotnet.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/helpindotnet.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/helpindotnet.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/helpindotnet.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/helpindotnet.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/helpindotnet.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=29&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://helpindotnet.wordpress.com/2011/02/17/generate-structured-class-from-xml-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d3bc7e3f88af79e0b21f093bc7f6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rohit</media:title>
		</media:content>
	</item>
		<item>
		<title>Back button refresh page</title>
		<link>http://helpindotnet.wordpress.com/2010/04/20/24/</link>
		<comments>http://helpindotnet.wordpress.com/2010/04/20/24/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 13:11:46 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Asp.net, c#, mssql, XML]]></category>
		<category><![CDATA[back button]]></category>
		<category><![CDATA[browser back button]]></category>
		<category><![CDATA[checkbox click back button]]></category>
		<category><![CDATA[refresh page after click]]></category>
		<category><![CDATA[reload dropdown]]></category>
		<category><![CDATA[reload page]]></category>

		<guid isPermaLink="false">http://helpindotnet.wordpress.com/?p=24</guid>
		<description><![CDATA[There are situation wherein you need to reload the page/control state after browser&#8217;s &#8220;Back&#8221; button is pressed. For example: If you have a checkbox, If someone clicks on checkbox  postback and selectedindexchange/checkedchange event is fired. Once browser&#8217;s back button is pressed, page is refreshed but still the checkbox is checked. Below is the solution for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=24&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are situation wherein you need to reload the page/control state after browser&#8217;s &#8220;Back&#8221; button is pressed.</p>
<p>For example: If you have a checkbox, If someone clicks on checkbox  postback and selectedindexchange/checkedchange event is fired. Once browser&#8217;s back button is pressed, page is refreshed but still the checkbox is checked.</p>
<p>Below is the solution for this.</p>
<p><span style="font-family:monospace;line-height:18px;font-size:12px;white-space:pre;"> protected override void OnInit(EventArgs e)</span></p>
<pre><code>    {
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetNoStore();
        Response.Cache.SetExpires(DateTime.MinValue);

        base.OnInit(e);
    }
</code></pre>
<br />Filed under: <a href='http://helpindotnet.wordpress.com/category/aspnet-c-mssql-xml/'>Asp.net, c#, mssql, XML</a> Tagged: <a href='http://helpindotnet.wordpress.com/tag/back-button/'>back button</a>, <a href='http://helpindotnet.wordpress.com/tag/browser-back-button/'>browser back button</a>, <a href='http://helpindotnet.wordpress.com/tag/checkbox-click-back-button/'>checkbox click back button</a>, <a href='http://helpindotnet.wordpress.com/tag/refresh-page-after-click/'>refresh page after click</a>, <a href='http://helpindotnet.wordpress.com/tag/reload-dropdown/'>reload dropdown</a>, <a href='http://helpindotnet.wordpress.com/tag/reload-page/'>reload page</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/helpindotnet.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/helpindotnet.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/helpindotnet.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/helpindotnet.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/helpindotnet.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/helpindotnet.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/helpindotnet.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/helpindotnet.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/helpindotnet.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/helpindotnet.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/helpindotnet.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/helpindotnet.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/helpindotnet.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/helpindotnet.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=24&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://helpindotnet.wordpress.com/2010/04/20/24/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d3bc7e3f88af79e0b21f093bc7f6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rohit</media:title>
		</media:content>
	</item>
		<item>
		<title>Bind XML to Nested Repeater</title>
		<link>http://helpindotnet.wordpress.com/2010/04/15/bind-xml-to-nested-repeater/</link>
		<comments>http://helpindotnet.wordpress.com/2010/04/15/bind-xml-to-nested-repeater/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 14:05:04 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[1]]></category>
		<category><![CDATA[bind nested xml element]]></category>
		<category><![CDATA[bind xml to nested repeater]]></category>
		<category><![CDATA[multiple repeater]]></category>
		<category><![CDATA[nested repeater]]></category>
		<category><![CDATA[xml to repeater]]></category>

		<guid isPermaLink="false">http://helpindotnet.wordpress.com/?p=20</guid>
		<description><![CDATA[A simple method to bind nested repeaters with xml upto level3 ( you can go upto n level with this method). Easiest and simplest method. &#60;!&#8211; Xml file to be used &#8211;&#62; &#60;Root&#62; &#60;Level1 Name=&#8221;Level1&#8243; id=&#8221;L1&#8243;&#62; &#60;Level2 Name=&#8221;Level2&#8243; id=&#8221;L2&#8243; &#62; &#60;Level3 Value=&#8221;28&#8243; id=&#8221;L3-1&#8243; sortkey=&#8221;1&#8243;&#62;&#60;/Level3&#62; &#60;Level3 Value=&#8221;28&#8243; id=&#8221;L3-2&#8243;  sortkey=&#8221;2&#8243;&#62;&#60;/Level3&#62; &#60;/Level2&#62; &#60;/Level1&#62; &#60;/Root&#62; &#60;!&#8211; End XML &#8211;&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=20&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">
<div id="_mcePaste">A simple method to bind nested repeaters with xml upto level3 ( you can go upto n level with this method).</div>
<div>Easiest and simplest method.</div>
<div>&lt;!&#8211; Xml file to be used &#8211;&gt;</div>
<div>&lt;Root&gt;</div>
<div id="_mcePaste">&lt;Level1 Name=&#8221;Level1&#8243; id=&#8221;L1&#8243;&gt;</div>
<div id="_mcePaste">&lt;Level2 Name=&#8221;Level2&#8243; id=&#8221;L2&#8243; &gt;</div>
<div id="_mcePaste">&lt;Level3 Value=&#8221;28&#8243; id=&#8221;L3-1&#8243; sortkey=&#8221;1&#8243;&gt;&lt;/Level3&gt;</div>
<div id="_mcePaste">&lt;Level3 Value=&#8221;28&#8243; id=&#8221;L3-2&#8243;  sortkey=&#8221;2&#8243;&gt;&lt;/Level3&gt;</div>
<div id="_mcePaste">&lt;/Level2&gt;</div>
<div id="_mcePaste">&lt;/Level1&gt;</div>
<div id="_mcePaste">&lt;/Root&gt;</div>
<div>&lt;!&#8211; End XML &#8211;&gt;</div>
</div>
<div>&lt;asp:Repeater runat=&#8221;server&#8221; ID=&#8221;rpt1&#8243;&gt;</div>
<div>
<div>&lt;ItemTemplate&gt;</div>
<div>&lt;%# ((System.Xml.XmlNode)Container.DataItem).Attributes["Name"].Value%&gt; //Level1</div>
<div>
<div>&lt;asp:Repeater runat=&#8221;server&#8221; ID=&#8221;rpt2&#8243;  DataSource=&#8217;&lt;%# ((System.Xml.XmlNode)Container.DataItem).SelectNodes(&#8220;Level2&#8243;) %&gt;&#8217;&gt; //Bind level2 nodes</div>
<div>&lt;ItemTemplate&gt;</div>
<div>&lt;%# ((System.Xml.XmlNode)Container.DataItem).Attributes["Name"].Value%&gt; //Level2</div>
<div>
<div>&lt;asp:Repeater runat=&#8221;server&#8221; ID=&#8221;rpt3&#8243;  DataSource=&#8217;&lt;%# ((System.Xml.XmlNode)Container.DataItem).SelectNodes(&#8220;Level3&#8243;) %&gt;&#8217;&gt; //Bind level3 nodes</div>
<div>&lt;ItemTemplate&gt;</div>
<div>&lt;%# ((System.Xml.XmlNode)Container.DataItem).Attributes["Value"].Value%&gt; //Level3</div>
<div>
<div>&lt;/ItemTemplate&gt;</div>
<div>&lt;/asp:Repeater&gt;</div>
<div>
<div>&lt;/ItemTemplate&gt;</div>
<div>&lt;/asp:Repeater&gt;</div>
<div>
<div>&lt;/ItemTemplate&gt;</div>
<div>&lt;/asp:Repeater&gt;</div>
</div>
</div>
<div>
<div>Now Bind the Level1 Repeater with below code..</div>
<div>XmlDocument doc = new XmlDocument();</div>
<div id="_mcePaste">doc.Load(MapPath(&#8220;../../test.xml&#8221;)); //Path of your xml</div>
<div id="_mcePaste">XmlNodeList nodes =</div>
<div id="_mcePaste">doc.SelectNodes(&#8220;Root/Level1&#8243;); //The first level you need to bind</div>
<div>
<div>rpt1.DataSource = nodes;</div>
<div>rpt1.DataBind();</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br />Filed under: <a href='http://helpindotnet.wordpress.com/category/1/'>1</a> Tagged: <a href='http://helpindotnet.wordpress.com/tag/bind-nested-xml-element/'>bind nested xml element</a>, <a href='http://helpindotnet.wordpress.com/tag/bind-xml-to-nested-repeater/'>bind xml to nested repeater</a>, <a href='http://helpindotnet.wordpress.com/tag/multiple-repeater/'>multiple repeater</a>, <a href='http://helpindotnet.wordpress.com/tag/nested-repeater/'>nested repeater</a>, <a href='http://helpindotnet.wordpress.com/tag/xml-to-repeater/'>xml to repeater</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/helpindotnet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/helpindotnet.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/helpindotnet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/helpindotnet.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/helpindotnet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/helpindotnet.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/helpindotnet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/helpindotnet.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/helpindotnet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/helpindotnet.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/helpindotnet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/helpindotnet.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/helpindotnet.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/helpindotnet.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=20&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://helpindotnet.wordpress.com/2010/04/15/bind-xml-to-nested-repeater/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d3bc7e3f88af79e0b21f093bc7f6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rohit</media:title>
		</media:content>
	</item>
		<item>
		<title>Import CSV to sql from asp.net c#</title>
		<link>http://helpindotnet.wordpress.com/2008/07/10/import-csv-to-sql-from-aspnet-c/</link>
		<comments>http://helpindotnet.wordpress.com/2008/07/10/import-csv-to-sql-from-aspnet-c/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 13:17:45 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[asp.net c#]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[csv to sql]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[get csv]]></category>
		<category><![CDATA[import csv file to database]]></category>
		<category><![CDATA[import csv to sql]]></category>
		<category><![CDATA[read csv file]]></category>

		<guid isPermaLink="false">http://helpindotnet.wordpress.com/?p=19</guid>
		<description><![CDATA[Here I will show how to Import data from csv file to sql database or any other database. //This is the connection string to connect to your csv file string strConString = &#8220;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\; Extended Properties=\&#8221;Text;HDR=YES;\&#8221;"; // open connection OleDbConnection oCon = new OleDbConnection(strConString); oCon.Open(); // fill data set string strSql = &#8220;SELECT * FROM [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=19&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here I will show how to Import data from csv file to sql database or any other database.</p>
<p>//This is the connection string to connect to your csv file<br />
string strConString = &#8220;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\; Extended Properties=\&#8221;Text;HDR=YES;\&#8221;";</p>
<p>// open connection<br />
OleDbConnection oCon = new OleDbConnection(strConString);<br />
oCon.Open();</p>
<p>// fill data set<br />
string strSql = &#8220;SELECT * FROM csvfile.csv&#8221;; //csvfile should be present in c:<br />
OleDbDataAdapter oDA = new OleDbDataAdapter(strSql, oCon);<br />
DataSet oData = new DataSet();<br />
oDA.Fill(oData, &#8220;ABC&#8221;);<br />
GridView1.DataSource = oData;<br />
GridView1.DataBind();</p>
<p>oCon.Close();</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/helpindotnet.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/helpindotnet.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/helpindotnet.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/helpindotnet.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/helpindotnet.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/helpindotnet.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/helpindotnet.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/helpindotnet.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/helpindotnet.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/helpindotnet.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/helpindotnet.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/helpindotnet.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/helpindotnet.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/helpindotnet.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/helpindotnet.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/helpindotnet.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=19&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://helpindotnet.wordpress.com/2008/07/10/import-csv-to-sql-from-aspnet-c/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d3bc7e3f88af79e0b21f093bc7f6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rohit</media:title>
		</media:content>
	</item>
		<item>
		<title>SSIS: Integration services: Throw error from Script Task (Error Handling)</title>
		<link>http://helpindotnet.wordpress.com/2008/06/10/ssis-integration-services-throw-error-from-script-task-error-handling/</link>
		<comments>http://helpindotnet.wordpress.com/2008/06/10/ssis-integration-services-throw-error-from-script-task-error-handling/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 06:58:50 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[integration services]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[error from script task]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[script task error]]></category>
		<category><![CDATA[script task fireerror]]></category>
		<category><![CDATA[ssis error handling]]></category>
		<category><![CDATA[trow error from script task]]></category>

		<guid isPermaLink="false">http://helpindotnet.wordpress.com/?p=18</guid>
		<description><![CDATA[There may be requirement to throw error from Script Task. Here&#8217;s a way to Throw error from Script Task. //Code Starts Here Try &#8216;method which throws an error Catch e Me.ComponentMetadata.FireError(-1, &#8220;&#8221;, &#8220;Your Error Message: &#8221; + e.Message, &#8220;&#8221;, true) While Not e.InnerException Is Nothing e = e.InnerException Me.ComponentMetadata.FireError(-1, &#8220;&#8221;, &#8220;InnerException: &#8221; + e.Message, &#8220;&#8221;, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=18&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There may be requirement to throw error from Script Task.<br />
Here&#8217;s a way to Throw error from Script Task.</p>
<p>//Code Starts Here<br />
Try<br />
    &#8216;method which throws an error<br />
Catch e<br />
    Me.ComponentMetadata.FireError(-1, &#8220;&#8221;, &#8220;Your Error Message: &#8221; + e.Message, &#8220;&#8221;, true)<br />
    While Not e.InnerException Is Nothing<br />
        e = e.InnerException<br />
        Me.ComponentMetadata.FireError(-1, &#8220;&#8221;, &#8220;InnerException: &#8221; + e.Message, &#8220;&#8221;, true)<br />
    End While<br />
End Try<br />
//Code Ends Here</p>
<p>For logging this error, Use below Code..</p>
<p>    Dts.Events.FireError(-1, &#8220;&#8221;, &#8220;Your Error Message: &#8221; + e.ToString(), &#8220;&#8221;, 0) </p>
<p>Here ToString() will fetch all the InnerException Messages.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/helpindotnet.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/helpindotnet.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/helpindotnet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/helpindotnet.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/helpindotnet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/helpindotnet.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/helpindotnet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/helpindotnet.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/helpindotnet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/helpindotnet.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/helpindotnet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/helpindotnet.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/helpindotnet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/helpindotnet.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/helpindotnet.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/helpindotnet.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=18&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://helpindotnet.wordpress.com/2008/06/10/ssis-integration-services-throw-error-from-script-task-error-handling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d3bc7e3f88af79e0b21f093bc7f6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rohit</media:title>
		</media:content>
	</item>
		<item>
		<title>SSIS: Logging from script task</title>
		<link>http://helpindotnet.wordpress.com/2008/06/05/ssis-logging-from-script-task/</link>
		<comments>http://helpindotnet.wordpress.com/2008/06/05/ssis-logging-from-script-task/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 07:47:41 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[integration services]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[integration services log]]></category>
		<category><![CDATA[logging ssis]]></category>
		<category><![CDATA[script task]]></category>
		<category><![CDATA[script task log]]></category>
		<category><![CDATA[ssis log]]></category>

		<guid isPermaLink="false">http://helpindotnet.wordpress.com/?p=17</guid>
		<description><![CDATA[This post will show you how to log from the script task. While logging from inbuilt log system this method helps you to log the exact details of the event in the script task. using System; using System.Data; using System.Math; using Microsoft.SqlServer.Dts.Runtime; public class ScriptMain { public void Main() { // int rowsProcessed = 100; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=17&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post will show you how to log from the script task.<br />
While logging from inbuilt log system this method helps you to log the exact details of the event in the script task.</p>
<p>using System;<br />
using System.Data;<br />
using System.Math;<br />
using Microsoft.SqlServer.Dts.Runtime;</p>
<p>public class ScriptMain<br />
{</p>
<p>    public void Main()<br />
    {<br />
        //<br />
        int rowsProcessed = 100;<br />
        byte[] emptyBytes = new byte[0];</p>
<p>        try<br />
        {<br />
            Dts.Log(&#8220;Rows processed: &#8220;+rowsProcessed.ToString, 0, emptyBytes);<br />
            Dts.TaskResult = Dts.Results.Success;<br />
        }<br />
        catch(Exception ex)<br />
        {<br />
            //An error occurred.<br />
            Dts.Events.FireError(0, &#8220;Script Task Example&#8221;, ex.Message+ControlChars.CrLf+ex.StackTrace, String.Empty, 0);<br />
            Dts.TaskResult = Dts.Results.Failure;<br />
        }</p>
<p>    }</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/helpindotnet.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/helpindotnet.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/helpindotnet.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/helpindotnet.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/helpindotnet.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/helpindotnet.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/helpindotnet.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/helpindotnet.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/helpindotnet.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/helpindotnet.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/helpindotnet.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/helpindotnet.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/helpindotnet.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/helpindotnet.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/helpindotnet.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/helpindotnet.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=17&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://helpindotnet.wordpress.com/2008/06/05/ssis-logging-from-script-task/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d3bc7e3f88af79e0b21f093bc7f6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rohit</media:title>
		</media:content>
	</item>
		<item>
		<title>SSIS: Send SMTP mail from Script task</title>
		<link>http://helpindotnet.wordpress.com/2008/06/04/ssis-send-smtp-mail-from-script-task/</link>
		<comments>http://helpindotnet.wordpress.com/2008/06/04/ssis-send-smtp-mail-from-script-task/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 10:19:31 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[integration services]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[email script task]]></category>
		<category><![CDATA[integration services email]]></category>
		<category><![CDATA[integration services send email]]></category>
		<category><![CDATA[send email from scrit task]]></category>
		<category><![CDATA[send mail from ssis]]></category>
		<category><![CDATA[send mail task]]></category>
		<category><![CDATA[ssis email]]></category>
		<category><![CDATA[ssis send mail]]></category>

		<guid isPermaLink="false">http://helpindotnet.wordpress.com/?p=16</guid>
		<description><![CDATA[Here i will show how to send SMTP email from a script task rather than the SMTP Mail Task. Imports System Imports Microsoft.SqlServer.Dts.Runtime Imports System.Net.Mail Imports System.Net Public Class ScriptMain Public Sub Main() Dim myHtmlMessage As MailMessage Dim mySmtpClient As SmtpClient myHtmlMessage=New MailMessage(name@helpindotnet.blogspot.com, &#8220;name@helpindotnet.blogspot.com&#8221;, &#8220;Subject&#8221;, &#8220;body&#8221;) mySmtpClient = New SmtpClient(&#8220;192.168.3.75&#8243;) mySmtpClient.Credentials = CredentialCache.DefaultNetworkCredentials mySmtpClient.Send(myHtmlMessage) Dts.TaskResult [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=16&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here i will show how to send SMTP email from a script task rather than the SMTP Mail Task.</p>
<p>Imports System<br />
Imports Microsoft.SqlServer.Dts.Runtime<br />
Imports System.Net.Mail<br />
Imports System.Net</p>
<p>Public Class ScriptMain<br />
  Public Sub Main()<br />
    Dim myHtmlMessage As MailMessage<br />
    Dim mySmtpClient As SmtpClient</p>
<p>   myHtmlMessage=New MailMessage(name@helpindotnet.blogspot.com,<br />
                        &#8220;name@helpindotnet.blogspot.com&#8221;, &#8220;Subject&#8221;, &#8220;body&#8221;)<br />
    mySmtpClient = New SmtpClient(&#8220;192.168.3.75&#8243;)<br />
    mySmtpClient.Credentials = CredentialCache.DefaultNetworkCredentials<br />
    mySmtpClient.Send(myHtmlMessage)<br />
    Dts.TaskResult = Dts.Results.Success</p>
<p>    Dts.TaskResult = Dts.Results.Success<br />
  End Sub<br />
End Class</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/helpindotnet.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/helpindotnet.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/helpindotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/helpindotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/helpindotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/helpindotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/helpindotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/helpindotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/helpindotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/helpindotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/helpindotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/helpindotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/helpindotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/helpindotnet.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/helpindotnet.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/helpindotnet.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=16&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://helpindotnet.wordpress.com/2008/06/04/ssis-send-smtp-mail-from-script-task/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d3bc7e3f88af79e0b21f093bc7f6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rohit</media:title>
		</media:content>
	</item>
		<item>
		<title>Remove Special Character from XML string using SQL Server</title>
		<link>http://helpindotnet.wordpress.com/2008/06/02/remove-special-character-from-xml-string-using-sql-server/</link>
		<comments>http://helpindotnet.wordpress.com/2008/06/02/remove-special-character-from-xml-string-using-sql-server/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 06:55:41 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[xml]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[xml special character]]></category>
		<category><![CDATA[mssql function]]></category>
		<category><![CDATA[remove special character from xml string]]></category>
		<category><![CDATA[sql function to remove special character]]></category>
		<category><![CDATA[xml string]]></category>

		<guid isPermaLink="false">http://helpindotnet.wordpress.com/?p=15</guid>
		<description><![CDATA[Create a function in MSSQL to remove all special characters from XML. ALTER FUNCTION [dbo].[RemoveSpChar] ( &#8211; Add the parameters for the function here @sInput varchar(MAX)=&#8221; ) RETURNS varchar(MAX) AS BEGIN &#8211; Declare the return variable here DECLARE @sOutput Varchar(MAX), @iIndex int, @iLength int, @sChar varchar(1), @iASCII int, @iLen int, @iRem int set @sInput= ltrim(rtrim(@sInput)) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=15&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Create a function in MSSQL to remove all special characters from XML.</p>
<p>ALTER  FUNCTION [dbo].[RemoveSpChar]<br />
(<br />
&#8211; Add the parameters for the function here<br />
@sInput varchar(MAX)=&#8221;<br />
)<br />
RETURNS varchar(MAX)<br />
AS<br />
BEGIN<br />
&#8211; Declare the return variable here<br />
DECLARE @sOutput Varchar(MAX),<br />
@iIndex int,<br />
@iLength int,<br />
@sChar varchar(1),<br />
@iASCII int,<br />
@iLen int,<br />
@iRem int</p>
<p>set @sInput= ltrim(rtrim(@sInput))<br />
set @iLength = len(@sInput)<br />
set @iIndex =1<br />
set @sOutput=&#8221;</p>
<p>while @iIndex &lt;= @iLength<br />
begin<br />
set @sChar=substring(@sInput,@iIndex,1)<br />
set @iASCII=ascii(@sChar)</p>
<p>if ((@iASCII&gt;=48 and @iASCII&lt;=57) or (@iASCII&gt;=65 and @iASCII&lt;=90) or (@iASCII&gt;=97 and @iASCII&lt;=122) )<br />
set @sOutput=@sOutput+@sChar<br />
&#8211;return @sChar + &#8216; &#8211; &#8216; + convert(varchar,@iASCII)<br />
set @iIndex =@iIndex +1<br />
end</p>
<p>if len(@sOutput)&gt;17<br />
set @sOutput=substring(@sOutput,1,17)<br />
else if len(@sOutput)&lt;6<br />
begin<br />
set @iLen=len(@sOutput)<br />
set @iRem=6-@iLen</p>
<p>set @sOutput=substring(@sOutput + replicate(&#8217;0&#8242;,@iRem),1,6)</p>
<p>end</p>
<p>&#8211; Return the result of the function<br />
RETURN @sOutput</p>
<p>END</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/helpindotnet.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/helpindotnet.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/helpindotnet.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/helpindotnet.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/helpindotnet.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/helpindotnet.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/helpindotnet.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/helpindotnet.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/helpindotnet.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/helpindotnet.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/helpindotnet.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/helpindotnet.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/helpindotnet.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/helpindotnet.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/helpindotnet.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/helpindotnet.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=15&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://helpindotnet.wordpress.com/2008/06/02/remove-special-character-from-xml-string-using-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d3bc7e3f88af79e0b21f093bc7f6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rohit</media:title>
		</media:content>
	</item>
		<item>
		<title>- Fetch XML (xmldatadocument)  from database</title>
		<link>http://helpindotnet.wordpress.com/2008/05/07/fetch-xml-xmldatadocument-from-database/</link>
		<comments>http://helpindotnet.wordpress.com/2008/05/07/fetch-xml-xmldatadocument-from-database/#comments</comments>
		<pubDate>Wed, 07 May 2008 13:19:21 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[asp.net c#]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[get xml from sql]]></category>
		<category><![CDATA[sql from xml]]></category>
		<category><![CDATA[xml from database]]></category>
		<category><![CDATA[xmldatadocument]]></category>

		<guid isPermaLink="false">http://helpindotnet.wordpress.com/?p=14</guid>
		<description><![CDATA[This post shows you how to return XmlDataDocument from the database. This helps you to fetch the xml data created in sql and use in asp.net. If you are familiar how to get xml data from sql then this post helps you to fetch the xml data in XmlDataDocument. //Code Starts Here // http://helpindotnet.blogspot.com/ // [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=14&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post shows you how to return XmlDataDocument from the database.<br />
This helps you to fetch the xml data created in sql and use in asp.net.<br />
If you are familiar how to get xml data from sql then this post helps you to fetch the xml data in XmlDataDocument.</p>
<p>//Code Starts Here</p>
<p>// http://helpindotnet.blogspot.com/<br />
// http://helpindotnet.wordpress.com</p>
<p>public XmlDataDocument getauditnames(string prefixText, int count)<br />
{</p>
<p>XmlDataDocument xml = new XmlDataDocument();<br />
SqlConnection con = new SqlConnection(&#8221; &lt;&lt;Connection String &gt;&gt;&#8221;);<br />
SqlCommand com = new SqlCommand(&#8220;&lt;&lt;Query&gt;&gt; For XML PATH (&#8216;Path&#8217;), root(&#8216;Root&#8217;)&#8221;, con);<br />
//The key to this step is the FOR XML PATH(###), ROOT(###) part. This tells SQL Server to return XML with each row having the element name //&#8221;Path&#8221; of and the root of the XML document to be ROOT<br />
con.Open();<br />
XmlReader xdr = com.ExecuteXmlReader();<br />
xml.Load(xdr);<br />
xdr.Close();<br />
con.Close();<br />
return xml;<br />
}<br />
//Code Ends Here</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/helpindotnet.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/helpindotnet.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/helpindotnet.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/helpindotnet.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/helpindotnet.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/helpindotnet.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/helpindotnet.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/helpindotnet.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/helpindotnet.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/helpindotnet.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/helpindotnet.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/helpindotnet.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/helpindotnet.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/helpindotnet.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/helpindotnet.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/helpindotnet.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=14&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://helpindotnet.wordpress.com/2008/05/07/fetch-xml-xmldatadocument-from-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d3bc7e3f88af79e0b21f093bc7f6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rohit</media:title>
		</media:content>
	</item>
		<item>
		<title>- GZIP Compress a file using Asp.net and C#.</title>
		<link>http://helpindotnet.wordpress.com/2008/05/06/gzip-compress-a-file-using-aspnet-and-c/</link>
		<comments>http://helpindotnet.wordpress.com/2008/05/06/gzip-compress-a-file-using-aspnet-and-c/#comments</comments>
		<pubDate>Tue, 06 May 2008 08:58:36 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[asp.net c#]]></category>
		<category><![CDATA[compress a file]]></category>
		<category><![CDATA[compress file]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[GZip Compress Decompress]]></category>

		<guid isPermaLink="false">http://helpindotnet.wordpress.com/?p=13</guid>
		<description><![CDATA[&#60;span style=&#8221;font-weight:bold;&#8221;&#62;Here I will show you the easiest way to compress and Decompress (Gzip) a file using Asp.net with c#. You can compress any file with this method.&#60;/span&#62; //Code Starts here using System; using System.Collections.Generic; using System.Text; using System.IO; using System.IO.Compression; /* * http://helpindotnet.blogspot.com/ */ namespace ConsoleApplication1 { class GZipTest { private const int buffer_size [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=13&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&lt;span style=&#8221;font-weight:bold;&#8221;&gt;Here I will show you the easiest way to compress and Decompress (Gzip) a file using Asp.net with c#.<br />
You can compress any file with this method.&lt;/span&gt;</p>
<p>//Code Starts here</p>
<p>using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.IO;<br />
using System.IO.Compression;</p>
<p>/*<br />
* http://helpindotnet.blogspot.com/<br />
*/</p>
<p>namespace ConsoleApplication1<br />
{<br />
class GZipTest<br />
{<br />
private const int buffer_size = 100;</p>
<p>public static int ReadAllBytesFromStream(Stream stream, byte[] buffer)<br />
{<br />
// Use this method is used to read all bytes from a stream.<br />
int offset = 0;<br />
int totalCount = 0;<br />
while (true)<br />
{<br />
int bytesRead = stream.Read(buffer, offset, buffer_size);<br />
if (bytesRead == 0)<br />
{<br />
break;<br />
}<br />
offset += bytesRead;<br />
totalCount += bytesRead;<br />
}<br />
return totalCount;<br />
}</p>
<p>public static bool CompareData(byte[] buf1, int len1, byte[] buf2, int len2)<br />
{<br />
// Use this method to compare data from two different buffers.<br />
if (len1 != len2)<br />
{<br />
Console.WriteLine(&#8220;Number of bytes in two buffer are different {0}:{1}&#8221;, len1, len2);<br />
return false;<br />
}</p>
<p>for (int i = 0; i &lt; len1; i++)<br />
{<br />
if (buf1[i] != buf2[i])<br />
{<br />
Console.WriteLine(&#8220;byte {0} is different {1}|{2}&#8221;, i, buf1[i], buf2[i]);<br />
return false;<br />
}<br />
}<br />
Console.WriteLine(&#8220;All bytes compare.&#8221;);<br />
return true;<br />
}</p>
<p>public static void GZipCompressDecompress(string filename)<br />
{<br />
Console.WriteLine(&#8220;Test compression and decompression on file {0}&#8221;, filename);<br />
FileStream infile;<br />
try<br />
{<br />
// Open the file as a FileStream object.<br />
infile = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);<br />
byte[] buffer = new byte[infile.Length];<br />
// Read the file to ensure it is readable.<br />
int count = infile.Read(buffer, 0, buffer.Length);<br />
if (count != buffer.Length)<br />
{<br />
infile.Close();<br />
Console.WriteLine(&#8220;Test Failed: Unable to read data from file&#8221;);<br />
return;<br />
}<br />
infile.Close();<br />
FileStream fs = new FileStream(filename+&#8221;.gz&#8221;, FileMode.Append);<br />
MemoryStream ms = new MemoryStream();<br />
// Use the newly created memory stream for the compressed data.<br />
GZipStream compressedzipStream = new GZipStream(fs, CompressionMode.Compress, true);<br />
Console.WriteLine(&#8220;Compression&#8221;);<br />
compressedzipStream.Write(buffer, 0, buffer.Length);<br />
// Close the stream.<br />
compressedzipStream.Close();<br />
Console.WriteLine(&#8220;Original size: {0}, Compressed size: {1}&#8221;, buffer.Length, fs.Length);</p>
<p>ms.WriteTo(fs);</p>
<p>// Reset the memory stream position to begin decompression.<br />
ms.Position = 0;<br />
GZipStream zipStream = new GZipStream(ms, CompressionMode.Decompress);<br />
Console.WriteLine(&#8220;Decompression&#8221;);<br />
byte[] decompressedBuffer = new byte[buffer.Length + buffer_size];<br />
// Use the ReadAllBytesFromStream to read the stream.<br />
int totalCount = GZipTest.ReadAllBytesFromStream(zipStream, decompressedBuffer);<br />
Console.WriteLine(&#8220;Decompressed {0} bytes&#8221;, totalCount);</p>
<p>if (!GZipTest.CompareData(buffer, buffer.Length, decompressedBuffer, totalCount))<br />
{<br />
Console.WriteLine(&#8220;Error. The two buffers did not compare.&#8221;);<br />
}<br />
zipStream.Close();<br />
} // end try<br />
catch (InvalidDataException)<br />
{<br />
Console.WriteLine(&#8220;Error: The file being read contains invalid data.&#8221;);<br />
}<br />
catch (FileNotFoundException)<br />
{<br />
Console.WriteLine(&#8220;Error:The file specified was not found.&#8221;);<br />
}<br />
catch (ArgumentException)<br />
{<br />
Console.WriteLine(&#8220;Error: path is a zero-length string, contains only white space, or contains one or more invalid characters&#8221;);<br />
}<br />
catch (PathTooLongException)<br />
{<br />
Console.WriteLine(&#8220;Error: The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.&#8221;);<br />
}<br />
catch (DirectoryNotFoundException)<br />
{<br />
Console.WriteLine(&#8220;Error: The specified path is invalid, such as being on an unmapped drive.&#8221;);<br />
}<br />
catch (IOException)<br />
{<br />
Console.WriteLine(&#8220;Error: An I/O error occurred while opening the file.&#8221;);<br />
}<br />
catch (UnauthorizedAccessException)<br />
{<br />
Console.WriteLine(&#8220;Error: path specified a file that is read-only, the path is a directory, or caller does not have the required permissions.&#8221;);<br />
}<br />
catch (IndexOutOfRangeException)<br />
{<br />
Console.WriteLine(&#8220;Error: You must provide parameters for MyGZIP.&#8221;);<br />
}<br />
}</p>
<p>public static void Main(string[] args)<br />
{</p>
<p>Console.WriteLine(&#8220;Start&#8221;);</p>
<p>GZipCompressDecompress(&#8220;c:\\Test1.txt&#8221;);</p>
<p>}<br />
}<br />
}</p>
<p>//Code Ends Here</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/helpindotnet.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/helpindotnet.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/helpindotnet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/helpindotnet.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/helpindotnet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/helpindotnet.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/helpindotnet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/helpindotnet.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/helpindotnet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/helpindotnet.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/helpindotnet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/helpindotnet.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/helpindotnet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/helpindotnet.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/helpindotnet.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/helpindotnet.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=helpindotnet.wordpress.com&amp;blog=3613554&amp;post=13&amp;subd=helpindotnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://helpindotnet.wordpress.com/2008/05/06/gzip-compress-a-file-using-aspnet-and-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d3bc7e3f88af79e0b21f093bc7f6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Rohit</media:title>
		</media:content>
	</item>
	</channel>
</rss>
