OracleparamterOracle认证考试
文章作者 100test 发表时间 2010:02:27 07:48:27
来源 100Test.Com百考试题网
using (OracleConnection objConn = new OracleConnection("Data Source=ORCL. User ID=scott. Password=tiger"))
{
OracleCommand objCmd = new OracleCommand().
objCmd.Connection = objConn.
objCmd.CommandText = "human_resources.get_employee_department".
objCmd.CommandType = CommandType.StoredProcedure.
objCmd.Parameters.Add("cur_employees", OracleType.Cursor).Direction = ParameterDirection.Output.
objCmd.Parameters.Add("cur_departments", OracleType.Cursor).Direction = ParameterDirection.Output.
try
{
objConn.Open().
OracleDataReader objReader = objCmd.ExecuteReader().
prvPrintReader(objReader).
objReader.NextResult().
prvPrintReader(objReader).
}
catch (Exception ex)
{
System.Console.WriteLine("Exception: {0}",ex.ToString()).
}
objConn.Close().
}