Esempio n. 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);
        }
Esempio n. 2
0
 public GetColumnsResponseMessage(Guid requestID, Column[] columns, Exception exception)
 {
     if (columns == null)
         throw new ArgumentNullException ("columns");
     this.requestID = requestID;
     this.columns = columns;
     this.exception = exception;
 }
Esempio n. 3
0
 public void AddColumn(Table table, Column column)
 {
     perTableColumnsByID [table].Add (column.ID, column);
     perTableColumnsByName [table].Add (column.Name, column);
 }
Esempio n. 4
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;
 }
Esempio n. 5
0
 public ColumnSet(Column[] columns)
 {
     this.columns = columns;
 }