<?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/"
	>

<channel>
	<title>RedSouljaz Blog &#187; dataset</title>
	<atom:link href="http://redsouljaz.com/tag/dataset/feed/" rel="self" type="application/rss+xml" />
	<link>http://redsouljaz.com</link>
	<description>My Personal Blog&#039;s</description>
	<lastBuildDate>Mon, 25 Apr 2011 09:17:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to set command Timeout for getData() in TableAdapter</title>
		<link>http://redsouljaz.com/2010/02/04/how-to-set-command-timeout-for-getdata-in-tableadapter/</link>
		<comments>http://redsouljaz.com/2010/02/04/how-to-set-command-timeout-for-getdata-in-tableadapter/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 04:26:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Accesing CommandTimeout properties in a TableAdapter]]></category>
		<category><![CDATA[CommandTimeout property]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[How to set command Timeout for getData in TableAdapter]]></category>
		<category><![CDATA[set commandTimeout in TableAdapter]]></category>
		<category><![CDATA[TableAdapter]]></category>
		<category><![CDATA[xsd]]></category>

		<guid isPermaLink="false">http://redsouljaz.com/?p=304</guid>
		<description><![CDATA[One of the disadvantages when we using tableadapter to retrieve the data from database is they do not provide property to set command timeout (SHIT). This giving me a huge headache for my project which most of the entire project is using tableadapter instead of creating my own DAL or class.
After do some research on [...]]]></description>
			<content:encoded><![CDATA[<p>One of the disadvantages when we using tableadapter to retrieve the data from database is they do not provide property to set command timeout (SHIT). This giving me a huge headache for my project which most of the entire project is using tableadapter instead of creating my own DAL or class.<br />
After do some research on the internet, there is 1 ways to add command timeout in tableadapter dataset (.xsd file) which is</p>
<p>create new property inside partial class:<br />
Double click on xxxTableAdaper and it will show you behind code in .vb file of xsd file. Add this code inside Partial Public Class xxxDataTableAdapter</p>
<pre class="brush: vb;">
Namespace xxxTableAdapters
    Partial Public Class yyyTableAdapter
        Public WriteOnly Property CommandTimeout() As Integer
            Set(ByVal value As Integer)
                Dim i As Integer = 0
                While (i &lt; Me.CommandCollection.Length)
                    If (Me.CommandCollection(i) IsNot Nothing) Then
                        Me.CommandCollection(i).CommandTimeout = value
                    End If
                    i = (i + 1)
                End While
            End Set
        End Property
    End Class
End Namespace
</pre>
<p>And how you use it, you just add 1 line of code:</p>
<pre class="brush: vb;">
            Dim dt As New DataSet1TableAdapters.AddressTableAdapter
            dt.CommandTimeout = 120
            gridview1 = dt.GetData()
</pre>
<p>Notes:<br />
xxxTableAdapters , xxx you replace with the name of .xsd file<br />
yyyTableAdapter you replace with the name of table adapter</p>
<p>This code is tested in visual studio 2008 </p>
<p><a href="http://www.plus500.com/?id=21914&#038;pl=2&#038;tags=" target="_blank" title="Plus500"><img src="http://cdn.plus500.com/Media/Banners/728x90/439.gif" width="728" height="90" border="0" alt="Plus500" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2010/02/04/how-to-set-command-timeout-for-getdata-in-tableadapter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NET: How to read XML Data String to Dataset</title>
		<link>http://redsouljaz.com/2009/12/02/asp-net-how-to-read-xml-data-string-to-dataset/</link>
		<comments>http://redsouljaz.com/2009/12/02/asp-net-how-to-read-xml-data-string-to-dataset/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 13:54:43 +0000</pubDate>
		<dc:creator>Red Souldier</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Convert xml to dataset]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[How to convert XML data of web service into DataSet]]></category>
		<category><![CDATA[How to read XML Data String to Dataset]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://redsouljaz.wordpress.com/?p=233</guid>
		<description><![CDATA[The output of XML String:

&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34; ?&#62;
- &#60;NewDataSet&#62;
- &#60;Table&#62;
 &#60;CONDOM&#62;Durex&#60;/CONDOM&#62;
 &#60;SIZE&#62;XL&#60;/SIZE&#62;
 &#60;QTY&#62;123&#60;/QTY&#62;
 &#60;COLOR&#62;616&#60;/COLOR&#62;
 &#60;/Table&#62;
 &#60;/NewDataSet&#62;

In order to convert from XML to dataset, this is the code:


     Dim MyDS as new Dataset(&#34;Table1&#34;)
     Dim strReader As StringReader = New StringReader(YourXmlString)
     MyDS.ReadXml(strReader)

ad#300&#215;250]
]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-6936256854341804";
google_ad_slot = "3780730535";
google_ad_width = 300;
google_ad_height = 250;
//--></script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p>
<p>The output of XML String:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
- &lt;NewDataSet&gt;
- &lt;Table&gt;
 &lt;CONDOM&gt;Durex&lt;/CONDOM&gt;
 &lt;SIZE&gt;XL&lt;/SIZE&gt;
 &lt;QTY&gt;123&lt;/QTY&gt;
 &lt;COLOR&gt;616&lt;/COLOR&gt;
 &lt;/Table&gt;
 &lt;/NewDataSet&gt;
</pre>
<p>In order to convert from XML to dataset, this is the code:<br />
<span id="more-233"></span></p>
<pre class="brush: vb;">
     Dim MyDS as new Dataset(&quot;Table1&quot;)
     Dim strReader As StringReader = New StringReader(YourXmlString)
     MyDS.ReadXml(strReader)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2009/12/02/asp-net-how-to-read-xml-data-string-to-dataset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET &#8211; Convert CSV to Dataset</title>
		<link>http://redsouljaz.com/2009/07/17/asp-net-convert-csv-to-dataset/</link>
		<comments>http://redsouljaz.com/2009/07/17/asp-net-convert-csv-to-dataset/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 06:29:01 +0000</pubDate>
		<dc:creator>Red Souldier</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[convert csv to dataset]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[csv to dataset]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[import csv]]></category>
		<category><![CDATA[load csv]]></category>

		<guid isPermaLink="false">http://redsouljaz.wordpress.com/2009/07/17/asp-net-convert-csv-to-dataset/</guid>
		<description><![CDATA[In this post I will show you how to convert from .csv files to dataset in ASP.NET]]></description>
			<content:encoded><![CDATA[<p>In this post I will show you how to convert from .csv files to dataset in ASP.NET<br />
<span id="more-191"></span><br />
Here is the function to convert CSV file to dataset in asp.net using vb.net.<br />
First you need to upload the csv file into your web server, then save the file path.<br />
Add this function code:</p>
<pre class="brush: css;">

    Private Shared Function getCsvToDataset(ByVal strPath As String) As DataSet
        Dim strLine As String
        Dim strArray As String()
        Dim charArray As Char() = New Char() {&quot;,&quot;c}
        Dim ds As New DataSet()
        Dim dt As DataTable = ds.Tables.Add(&quot;TheData&quot;)
        Dim aFile As New FileStream(strPath, FileMode.Open)
        Dim sr As New StreamReader(aFile)

        strLine = sr.ReadLine()

        strArray = strLine.Split(charArray)

        For x As Integer = 0 To strArray.GetUpperBound(0)
            dt.Columns.Add(strArray(x).Trim())
        Next

        strLine = sr.ReadLine()
        While strLine IsNot Nothing
            strArray = strLine.Split(charArray)
            Dim dr As DataRow = dt.NewRow()
            For i As Integer = 0 To strArray.GetUpperBound(0)
                dr(i) = strArray(i).Trim()
            Next
            dt.Rows.Add(dr)
            strLine = sr.ReadLine()
        End While
        sr.Close()
        Return ds
    End Function
</pre>
<p>I think, this is the most effective way to convert csv to dataset. Before this, I already try to use Microsoft.Jet.OLEDB.4.0 but the problem that shows an error message in finding csv file on the web server. So this method using FileStream is the best way.</p>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2009/07/17/asp-net-convert-csv-to-dataset/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Connecting asp.net to Sql server 2005 stored procedures into dataset</title>
		<link>http://redsouljaz.com/2009/06/10/connecting-asp-net-to-sql-server-2005-stored-procedures-into-dataset/</link>
		<comments>http://redsouljaz.com/2009/06/10/connecting-asp-net-to-sql-server-2005-stored-procedures-into-dataset/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 07:20:30 +0000</pubDate>
		<dc:creator>Red Souldier</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[asp.net using dataset call stored procedures]]></category>
		<category><![CDATA[call sql server stored procedure]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[SqlDataReader]]></category>
		<category><![CDATA[stored procedures]]></category>
		<category><![CDATA[stored procedures to dataset]]></category>
		<category><![CDATA[using asp.net to call sql server stored procedure]]></category>

		<guid isPermaLink="false">http://redsouljaz.wordpress.com/?p=160</guid>
		<description><![CDATA[This article demonstrates how to use ASP.NET and ADO.NET with Visual Basic .NET to create and to call a Microsoft SQL Server stored procedure with an input parameter and an output parameter.]]></description>
			<content:encoded><![CDATA[<p>This article demonstrates how to use ASP.NET and ADO.NET with Visual Basic .NET to create and to call a Microsoft SQL Server stored procedure with an input parameter and an output parameter.</p>
<p>1 step create store procedure</p>
<pre class="brush: css;">

Create Procedure GetAuthorsByLastName1 (@au_lname varchar(40), @RowCount int output)
as

select * from authors where au_lname like @au_lname;

/* @@ROWCOUNT returns the number of rows that are affected by the last statement. */
select @RowCount=@@ROWCOUNT
</pre>
<p>Call the stored procedure in asp.net code<br />
<span id="more-160"></span></p>
<pre class="brush: css;">
  Private Function getDataset() As DataSet
        Dim DS As DataSet
        Dim MyConnection As SqlConnection
        Dim MyDataAdapter As SqlDataAdapter

        'Create a connection to the SQL Server.
        MyConnection = New SqlConnection(&quot;server=(local);database=pubs;Trusted_Connection=yes&quot;)

        'Create a DataAdapter, and then provide the name of the stored procedure.
        MyDataAdapter = New SqlDataAdapter(&quot;GetAuthorsByLastName&quot;, MyConnection)

        'Set the command type as StoredProcedure.
        MyDataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure

        'Create and add a parameter to Parameters collection for the stored procedure.
        MyDataAdapter.SelectCommand.Parameters.Add(New SqlParameter(&quot;@au_lname&quot;, _
       SqlDbType.VarChar, 40))

        'Assign the search value to the parameter.
        MyDataAdapter.SelectCommand.Parameters(&quot;@au_lname&quot;).Value = Trim(txtLastName.Text)

        'Create and add an output parameter to Parameters collection.
        MyDataAdapter.SelectCommand.Parameters.Add(New SqlParameter(&quot;@RowCount&quot;, _
        SqlDbType.Int, 4))

        'Set the direction for the parameter. This parameter returns the Rows returned.
        MyDataAdapter.SelectCommand.Parameters(&quot;@RowCount&quot;).Direction = ParameterDirection.Output

        DS = New DataSet() 'Create a new DataSet to hold the records.
        MyDataAdapter.Fill(DS, &quot;AuthorsByLastName&quot;) 'Fill the DataSet with the rows returned.

        'Get the number of rows returned, and then assign it to the variable
        Dim rowCount As String
        rowCount = MyDataAdapter.SelectCommand.Parameters(1).Value.ToString &amp; &quot; Rows Found!&quot;

        MyDataAdapter.Dispose() 'Dispose of the DataAdapter.
        MyConnection.Close() 'Close the connection.

        Return DS

    End Function
</pre>
]]></content:encoded>
			<wfw:commentRss>http://redsouljaz.com/2009/06/10/connecting-asp-net-to-sql-server-2005-stored-procedures-into-dataset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

