public static void executeNonQuery(string spName, ArrayList alParametros) { OracleConnection connection = OracleDAC.getConnection(); OracleCommand command = OracleDAC.getCommand(connection, spName, alParametros); command.CommandType = CommandType.StoredProcedure; command.ExecuteNonQuery(); OracleDAC.closeConnection(connection); }
public static object executeScalar(string sql, ArrayList alParametros) { OracleConnection connection = OracleDAC.getConnection(); OracleCommand command = OracleDAC.getCommand(connection, sql, alParametros); command.CommandType = CommandType.Text; object obj = command.ExecuteScalar(); OracleDAC.closeConnection(connection); return(obj); }
public static DataSet getDataset(string sql) { OracleConnection connection = OracleDAC.getConnection(); OracleCommand command = OracleDAC.getCommand(connection, sql); command.CommandType = CommandType.Text; OracleDataAdapter oracleDataAdapter = new OracleDataAdapter(command); DataSet dataSet = new DataSet(); ((DataAdapter)oracleDataAdapter).Fill(dataSet); OracleDAC.closeConnection(connection); return(dataSet); }
public static DataSet getDataset(string spName, ArrayList alParametros) { OracleConnection connection = OracleDAC.getConnection(); OracleCommand command = OracleDAC.getCommand(connection, spName, alParametros); command.CommandType = CommandType.StoredProcedure; OracleDataAdapter oracleDataAdapter = new OracleDataAdapter(command); DataSet dataSet = new DataSet(); ((DataAdapter)oracleDataAdapter).Fill(dataSet); OracleDAC.closeConnection(connection); return(dataSet); }