c#项目这段代码调用oracle存储过程分页,一直报错,都不知道怎么改
public static DataTable GetPageWithSp(ProcCustomPage pcp,out int recordCount)
{
using (var conn = new OracleConnection(cs))
{
using (var cmd = conn.CreateCommand())
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = pcp.Sp_PagerName;
cmd.InjectFrom(new SetParamsValues().IgnoreFields("sp_pagername"), pcp);
OracleParameter outputPara = new OracleParameter(":RecordCount",OracleType.Int32);
outputPara.Direction = ParameterDirection.Output;
cmd.Parameters.Add(outputPara);
conn.Open();
using (var da = new OracleDataAdapter(cmd))
{
DataSet ds = new DataSet();
da.Fill(ds);
cmd.Parameters.Clear();
recordCount = PublicMethod.GetInt(outputPara.Value);
conn.Close();
return ds.Tables[0];
}
}
}
}
报错内容:
ORA-06550: line 1, column 29:
PLS-00103: Encountered the symbol ":" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current exists max min prior sql stddev
sum variance execute forall merge time timestamp interval
date <a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternatively
ORA-06550: line 1, column 55:
PLS-00103: Encountered the symbol ":" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current exists max min prior sql
ORA-06550: line 1, column 81:
PLS-00103: Encountered the symbol ":" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-ident