Exemple #1
0
        List <BD2.Conv.Frontend.Table.Row> readRowsData(SqlConnection connection, SqlCommand command, SqlDataReader reader, Table table)
        {
            Console.WriteLine("readRowsData()");
            List <BD2.Conv.Frontend.Table.Row> rows = new List <BD2.Conv.Frontend.Table.Row> ();

            object[] values;
            //SortedDictionary<string, Column> table = tableColumns [context.Table.SqlTableID];
            string[] rowTFQNs = new string[reader.FieldCount];
            BD2.Conv.Frontend.Table.Column[] cols = new BD2.Conv.Frontend.Table.Column[reader.FieldCount];
            for (int n = 0; n != reader.FieldCount; n++)
            {
                cols [n]     = psc.GetColumnByName(table, reader.GetName(n));
                rowTFQNs [n] = cols [n].TFQN;
            }
            int       rc        = 0;
            ColumnSet columnSet = new ColumnSet(cols);

            while (reader.Read())
            {
                rc++;
                values = new object[reader.FieldCount];
                reader.GetValues(values);
                BD2.Conv.Frontend.Table.Row r = new BD2.Conv.Frontend.Table.Row(columnSet, values);
                rows.Add(r);
            }
            reader.Close();
            connection.Close();
            return(rows);
        }
Exemple #2
0
 List<BD2.Conv.Frontend.Table.Row> readRowsData(SqlConnection connection, SqlCommand command, SqlDataReader reader, Table table)
 {
     Console.WriteLine ("readRowsData()");
     List<BD2.Conv.Frontend.Table.Row> rows = new List<BD2.Conv.Frontend.Table.Row> ();
     object[] values;
     //SortedDictionary<string, Column> table = tableColumns [context.Table.SqlTableID];
     string[] rowTFQNs = new string[reader.FieldCount];
     BD2.Conv.Frontend.Table.Column[] cols = new BD2.Conv.Frontend.Table.Column[reader.FieldCount];
     for (int n = 0; n != reader.FieldCount; n++) {
         cols [n] = psc.GetColumnByName (table, reader.GetName (n));
         rowTFQNs [n] = cols [n].TFQN;
     }
     int rc = 0;
     ColumnSet columnSet = new ColumnSet (cols);
     while (reader.Read ()) {
         rc++;
         values = new object[reader.FieldCount];
         reader.GetValues (values);
         BD2.Conv.Frontend.Table.Row r = new BD2.Conv.Frontend.Table.Row (columnSet, values);
         rows.Add (r);
     }
     reader.Close ();
     connection.Close ();
     return rows;
 }