Example #1
0
 public LinkedList<LinkedList<string>> query(string query)
 {
     LinkedList<LinkedList<string>> result = null;
     if (connect())
     {
         try
         {
             result = new LinkedList<LinkedList<string>>();
             OracleDataReader result_table = new OracleCommand(query, con_link).ExecuteReader();
             while (result_table.Read()) {
                 LinkedList<string> row = new LinkedList<string>();
                 for (int i = 0; i < result_table.FieldCount; i++)
                 {
                     row.AddLast(result_table[i].ToString());
                 }
                 result.AddLast(row);
             }
             result_table.Close();
         }
         catch (Exception ex)
         {
             Console.WriteLine(ex);
         }
         finally
         {
             disconnect();
         }
     }
     return result;
 }