title: Datasets vs Sql Queries (select, procedure, function) Which is better to use?
body: <p>I currently use SQL queries (select, procedures, functions) for communication with database.</p>
  
  <p>Till now I have not used Dataset. I really can't get the concept of dataset. I just know that they can be used to select, insert, update, or delete from database too.</p>
  
  <p>But why would be even need a dataset, when we can use the SQL commands to do the same tasks.</p>
  
  <p>Is dataset better in terms of security? Or is it faster?</p>
  
  <p>Update:</p>
  
  <p>So I read this forum ashutosh gave
  <a href="http://social.msdn.microsoft.com/Forums/en/adodotnetdataset/thread/100cce91-cf9c-46c9-986a-98a409a196f2" rel="nofollow">http://social.msdn.microsoft.com/Forums/en/adodotnetdataset/thread/100cce91-cf9c-46c9-986a-98a409a196f2</a></p>
  
  <blockquote>
    <p>DataSet on the other side can be created from designer. Designer allows you to create tables, relations, contraints,... Drag and drop from Server Explorer might be another benefit. With DataAdpater you can create a typed DataSet upon the queries. If you're application requires import/export, you'll have to write this functionality on your own when using custom entities. With DataSet this ain't a problem, allowing you to import/export data into XML. It can also be bound to DataGridView or any other similar control. DataSet also supports one level of history, allowing you to revert to previous version of each row.</p>
  </blockquote>
  
  <p>Quite helpful, But still question persists, should I use Datasets or queries to handle database. Like editing records, updating, deleting and such.</p>
  
  <p>I use my queries like:</p>
  
  <pre><code>    SqlCommand cmdCheck = default(SqlCommand);
      string strQry ="Update, Delete, Insert queries";
  
      cmdCheck = new SqlCommand(strQry, Connection);
      openConnection();
      cmdCheck.ExecuteCommand();
      CloseConnection();
  </code></pre>
  
  <p>and DataAdapter For select queries.</p>