Пример #1
0
        public List <Object> executeQuery(string query)
        {
            List <Object> obj = new List <object>();

            try
            {
                conn.Open();
                OracleCommand    cmd    = new OracleCommand(query, conn);
                OracleDataReader reader = cmd.ExecuteReader();
                while (reader.Read())
                {
                    Object[] row = new Object[reader.RowSize];
                    for (int i = 0; i < reader.RowSize; i++)
                    {
                        row[i] = reader.GetData(i);
                    }
                    obj.Add(row);
                }
                conn.Close();
                return(obj);
            }
            catch
            {
                conn.Close();
                return(null);
            }
        }
 public IDataReader GetData(int i)
 {
     return(reader.GetData(i));
 }