executing pl/sql anonymous block
Posted: Wed 24 Oct 2012 15:18
When i use this.oracleCommand.ExecuteNonQuery() or oracommand.BeginExecuteNonQuery in order to execute a simple pl/sql anonymous block like this :
begin
null;
end;
this the code :
this.oracleCommand = new OracleCommand();
this.oracleCommand.Connection = this.oracleConnection;
this.oracleCommand.CommandText = @"begin null; end;";
this.oracleCommand.CommandType = CommandType.Text;
this.oracleCommand.ExecuteNonQuery();
I got the error:
---------------------------
---------------------------
ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
---------------------------
OK
---------------------------
The question is, how can i execute a pl/sql anonymous block by using dotconnect?
begin
null;
end;
this the code :
this.oracleCommand = new OracleCommand();
this.oracleCommand.Connection = this.oracleConnection;
this.oracleCommand.CommandText = @"begin null; end;";
this.oracleCommand.CommandType = CommandType.Text;
this.oracleCommand.ExecuteNonQuery();
I got the error:
---------------------------
---------------------------
ORA-06550: line 1, column 6:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge
<a single-quoted SQL string> pipe
---------------------------
OK
---------------------------
The question is, how can i execute a pl/sql anonymous block by using dotconnect?