OracleParameter[] para ={
new OracleParameter("p_StuGID",OracleType.VarChar),
new OracleParameter("p_Cursor",OracleType.Cursor,2000)
};
Cursor 对应的 是 C# 连接 Oracle 数据库显示数据时候,需要定义的游标 和 包
-- ==============================================
-- = 整理人: Longki
-- = 时间: 2011年9月8日16:02:24
-- = 功能:这么在Oracle中比较麻烦首先要建立一个包 在创建一个游标
-- = 创建有结果集的存储过程返回一个结果集 select * from list
-- ==============================================
create or replace package PK_LandBoardOA --创建一个名
as
type CS_LandBoardOA is ref cursor; --创建一个游标
end PK_LandBoardOA;
/
create or replace procedure GetAll
(
p_Cursor out PK_LandBoardOA.CS_LandBoardOA --定义一个CS_LandBoardOA类型的游标变量
)
is
begin
open p_Cursor for
select * from Student;
end;
/
我的程序是这样的
public DataTable GetListByPage(Pagination model, out int totalCount, out int totalPage)
{
DataTable dts = new DataTable();
OleDbParameter[] parameters = {
new OleDbParameter("p_tableName",OleDbType.VarChar),
new OleDbParameter("p_strWhere", OleDbType.VarChar),
new OleDbParameter("p_orderColumn", OleDbType.VarChar),
new OleDbParameter("p_orderStyle", OleDbType.VarChar),
new OleDbParameter("p_curPage", OleDbType.Integer),
new OleDbParameter("p_pageSize", OleDbType.Integer),
new OleDbParameter("p_fields", OleDbType.VarChar),
new OleDbParameter("p_totalRecords", OleDbType.Integer),
new OleDbParameter("p_totalPages", OleDbType.Integer),
new OleDbParameter("v_cur",OleDbType.VarBinary)};
parameters[0].Direction = ParameterDirection.Input;
parameters[1].Direction = ParameterDirection.Input;
parameters[2].Direction = ParameterDirection.Input;
parameters[3].Direction = ParameterDirection.Input;
parameters[4].Direction = ParameterDirection.Input;
parameters[5].Direction = ParameterDirection.Input;
parameters[6].Direction = ParameterDirection.Input;
parameters[7].Direction = ParameterDirection.Output;
parameters[8].Direction = ParameterDirection.Output;
parameters[9].Direction = ParameterDirection.Output;
OleDbParameter[] parameters = {
new OleDbParameter("p_tableName",OleDbType.VarChar),
new OleDbParameter("p_strWhere", OleDbType.VarChar),
new OleDbParameter("p_orderColumn", OleDbType.VarChar),
new OleDbParameter("p_orderStyle", OleDbType.VarChar),
new OleDbParameter("p_curPage", OleDbType.Integer),
new OleDbParameter("p_pageSize", OleDbType.Integer),
new OleDbParameter("p_fields", OleDbType.VarChar),
new OleDbParameter("p_totalRecords", OleDbType.Integer),
new OleDbParameter("p_totalPages", OleDbType.Integer),
new OleDbParameter("v_cur",OleDbType.VarBinary)};
new OleDbParameter("v_cur",OleDbType.)不知道写什么类型