GUEST_GETPAGE_ONE.SP_PAGE oracle中包里的存储过程,在pl/sql中可以执行
下面是调用的(pl/sql和asp.net中用的同一个用户)
OracleConnection cn = new OracleConnection(ConfigurationManager.ConnectionStrings[ "jspolice "].ConnectionString);
cn.Open();
OracleCommand cmd = new OracleCommand();
cmd.Connection = cn;
cmd.CommandText = "guest_getpage_one.sp_page ";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add( "p_pagesize ", OracleType.Number);
cmd.Parameters[ "p_pagesize "].Direction = ParameterDirection.Input;
cmd.Parameters[ "p_pagesize "].Value = 10;
cmd.Parameters.Add( "p_pageno ", OracleType.Number);
cmd.Parameters[ "p_pageno "].Direction = ParameterDirection.Input;
cmd.Parameters[ "p_pageno "].Value = 1;
cmd.Parameters.Add( "p_sqlselect ", OracleType.VarChar, 200);
cmd.Parameters[ "p_sqlselect "].Direction = ParameterDirection.Input;
cmd.Parameters[ "p_sqlselect "].Value = "select * from hn_guest ";
cmd.Parameters.Add( "p_sqlcount ", OracleType.VarChar, 200);
cmd.Parameters[ "p_sqlcount "].Direction = ParameterDirection.Input;
cmd.Parameters[ "p_sqlcount "].Value = "select * from hn_guest ";
cmd.Parameters.Add( "p_outrecordcount ", OracleType.Float);
cmd.Parameters[ "p_outrecordcount "].Direction = ParameterDirection.Output;
cmd.Parameters.Add( "p_pagecoun ", OracleType.Float);
cmd.Parameters[ "p_pagecoun "].Direction = ParameterDirection.Output;
cmd.Parameters.Add( "p_outcursor ", OracleType.Cursor);
cmd.Parameters[ "p_outcursor "].Direction = ParameterDirection.Output;
DataSet Ds = new DataSet();