title: How to split Oracle sql statements for ADO.NET
body: <p>What is the proper way to split up SQL statements to send to an Oracle ADO.NET client?  For instance, lets say you have the following code in a text file and want to execute these statements:</p>
  
  <pre><code>CREATE TABLE foo (bar VARCHAR2(100));
  INSERT INTO foo (bar) VALUES('one');
  INSERT INTO foo (bar) VALUES('two');
  </code></pre>
  
  <p>I believe trying to send all those in one Command will cause Oracle to complain about the ";".  My first thought would be to split on ";" character, and send them one at a time.</p>
  
  <p>But, Stored procedures can contain semi-colons as well, so how would I make it so the split routine would keep the whole stored proc together?  Does it need to look for begin/end statements as well, or "/"?</p>
  
  <p>Is there any difference in these respects between ODP.NET and the Micrsoft Oracle Provider?</p>