title: Invalid CREATE command when it is used with another command
body: <p>I am trying to print query result using solution in <a href="https://community.oracle.com/thread/1063574" rel="nofollow noreferrer">that page</a>.  The spool solution didn't work in my project but the other one worked in sqldeveloper. "run_query" procedure defined in that page. The problem is that it doesn't work in c# code. The code is like that:</p>
  
  <pre><code>cmd.CommandText = string.Format(@"CREATE OR REPLACE DIRECTORY TEST_DIR AS '{0}';
               exec run_query('SELECT {1} FROM  {2} {3} ORDER BY {4}','TEST_DIR','{5}');"
               ,strDirForFiles.Substring(0, strDirForFiles.Length - 2), 
               strColToSelect, strTableName, strWhere, strColToSelect, strTMPFileName);
  cmd.ExecuteNonQuery();
  </code></pre>
  
  <p>In runtime the query is like that:</p>
  
  <pre><code>CREATE DIRECTORY TEST_DIR AS 'C:\\';
  exec run_query('SELECT AccountNumber 
                  FROM  LowCreditList WHERE VersionNumber=1 AND ChangeStatus = 0 
                  ORDER BY AccountNumber','TEST_DIR','ASD.TMP'); 
  </code></pre>
  
  <p>But that code throws an exception like that:</p>
  
  <blockquote>
    <p>Message = "ERROR [HY000] [Oracle][ODBC][Ora]ORA-00901: invalid CREATE
    command\n"</p>
  </blockquote>
  
  <p>When I execute just </p>
  
  <pre><code>CREATE DIRECTORY TEST_DIR AS 'C:\\';
  </code></pre>
  
  <p>command, there is no exception.</p>
  
  <p>I can not figure it out. It works in sqldeveloper but not in C#.  </p>
  
  <p>NOTE: I use Visual Studio as administrator.</p>