有如下PL/SQL块:
string strSql = @"declare
o_error_code varchar2(1000);
o_error_msg  varchar2(1000);
t_res number;
begin
  t_res:=10;
end;";用OleDb调用:
OleDbCommand cmd = new OleDbCommand();
OleDbConnection con = new OleDbConnection("Provider=OraOleDb.Oracle;Data Source=..;Database=..;User Id=..;Password=..;");
cmd.Connection = con;
cmd.CommandText = strSql;
cmd.CommandType = CommandType.Text;
cmd.Connection.Open();
cmd.ExecuteNonQuery();
运行成功。
而用OracleClient:
OracleCommand cmd = new OracleCommand();
OracleConnection con = new OracleConnection(User ID=..;Password=..;Data Source=..;);
cmd.Connection = con;
cmd.CommandText = strSql;
cmd.CommandType = CommandType.Text;
cmd.Connection.Open();
cmd.ExecuteNonQuery();
出现如下错误:RA-06550: 第 2 行, 第 1 列: 
PLS-00103: 出现符号 ""在需要下列之一时:
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
符号 "" 被忽略。
ORA-06550: 第 3 行, 第 1 列: 
PLS-00103: 出现符号 ""在需要下列之一时:
begin case
  declare end exception exit for goto if loop mod null pragma
  raise return select update while with <an identifier>
  <a double-quoted delimited-identifier> <a bind var
........................不知道是什么原因啊,大家有没有碰到过???