title: Firebird: Alter table and create stored procedure from out C#
body: <p>I'm trying to create a stored procedure from out C# into Firebird 2.1.
  The code is:</p>
  
  <pre><code>String sql = @"EXECUTE BLOCK AS BEGIN " +
      "ALTER TABLE EXAMPLE ALTER FIELD1 TYPE Char(50); " +
      "SET TERM ^ ; CREATE PROCEDURE name ( input_parameter_name &lt; datatype&gt;, ... )" + 
      "RETURNS ( output_parameter_name &lt; datatype&gt;, ... ) AS DECLARE VARIABLE variable_name &lt; datatype&gt;;" +
      "BEGIN /* write your code here */ END^ SET TERM ; ^" + 
      " END";
  
      public int Execute(string sql)
      {
          int result = 0;
  
          if (this.OpenConnection() == true)
          {
              FbTransaction transaction = Fbconnection.BeginTransaction();
              try
              {
                  FbCommand command = new FbCommand(sql, Fbconnection, transaction);
                  int rc = command.ExecuteNonQuery();
                  result = rc;
                  transaction.Commit();
              }
              catch (Exception e)
              {
                  globals.logfile.log(e.ToString());
                  globals.logfile.flush();
                  result = 0;
              }
              finally
              {
                  this.CloseConnection();
              }
          }
          return result;
      }
  </code></pre>
  
  <p>The error message given is:</p>
  
  <blockquote>
    <p>FirebirdSql.Data.FirebirdClient.FbException (0x80004005):<br>
    Dynamic SQL Error SQL error code = -104 Token unknown - line 1, column 24 ALTER</p>
  </blockquote>
  
  <p>Must be something small, but I can't get it.</p>