title: Disable DML queries in SQLCommand C#
body: <h2>Problem</h2>
  
  <p>I'm writing a GUI application that allows users to generate an Excel file based on SELECT SQL query user enters in TextBox. It will connect to SQL server, run select over database, fill DataTable object and push that data to an Exel file.
  The way I have developed application is vulnerable for SQL injections and user may be able to pass any DML query such as DELETE OR UPDATE. </p>
  
  <h2>Question</h2>
  
  <p>Is there a way in SQLCLient library to prevent user from entering DML queries and executing them? Can I somehow enforce SQLCommand object to throw an exception when DELETE command is passed?</p>