<?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>Programming Life &#187; DataSet</title>
	<atom:link href="http://blog.coding.ro/tag/dataset/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.coding.ro</link>
	<description>Coding Through Life</description>
	<lastBuildDate>Fri, 13 Jan 2012 09:03:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>.NET DataSet Creation</title>
		<link>http://blog.coding.ro/net-dataset-creation/</link>
		<comments>http://blog.coding.ro/net-dataset-creation/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 08:07:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[DataSet]]></category>
		<category><![CDATA[DataSet Creation]]></category>

		<guid isPermaLink="false">http://blog.coding.ro/?p=7</guid>
		<description><![CDATA[private void GetData(string selectCommand) { try { // Specify a connection string. Replace the given value with a // valid connection string for a Northwind SQL Server sample // database accessible to your system. String connectionString = &#8220;Integrated Security=SSPI;Persist Security Info=False;&#8221; + &#8220;Initial Catalog=Northwind;Data Source=localhost&#8221;; // Create a new data adapter based on the specified [...]]]></description>
			<content:encoded><![CDATA[<p>private void GetData(string selectCommand)<br />
{<br />
try<br />
{<br />
// Specify a connection string. Replace the given value with a<br />
// valid connection string for a Northwind SQL Server sample<br />
// database accessible to your system.<br />
String connectionString =<br />
&#8220;Integrated Security=SSPI;Persist Security Info=False;&#8221; +<br />
&#8220;Initial Catalog=Northwind;Data Source=localhost&#8221;;</p>
<p>// Create a new data adapter based on the specified query.<br />
dataAdapter = new SqlDataAdapter(selectCommand, connectionString);</p>
<p>// Create a command builder to generate SQL update, insert, and<br />
// delete commands based on selectCommand. These are used to<br />
// update the database.<br />
SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter);</p>
<p>// Populate a new data table and bind it to the BindingSource.<br />
DataTable table = new DataTable();<br />
table.Locale = System.Globalization.CultureInfo.InvariantCulture;<br />
dataAdapter.Fill(table);<br />
bindingSource1.DataSource = table;</p>
<p>// Resize the DataGridView columns to fit the newly loaded content.<br />
dataGridView1.AutoResizeColumns(<br />
DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader);<br />
}<br />
catch (SqlException)<br />
{<br />
MessageBox.Show(&#8220;To run this example, replace the value of the &#8221; +<br />
&#8220;connectionString variable with a connection string that is &#8221; +<br />
&#8220;valid for your system.&#8221;);<br />
}<br />
}</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.coding.ro%2Fnet-dataset-creation%2F&amp;title=.NET%20DataSet%20Creation" id="wpa2a_2"><img src="http://blog.coding.ro/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.coding.ro/net-dataset-creation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

