예제 #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);
        }
예제 #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;
 }
예제 #3
0
 public void AddColumn(Table table, Column column)
 {
     perTableColumnsByID [table].Add (column.ID, column);
     perTableColumnsByName [table].Add (column.Name, column);
 }
예제 #4
0
파일: ServiceAgent.cs 프로젝트: vebin/BD2
 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;
 }
예제 #5
0
파일: ColumnSet.cs 프로젝트: vebin/BD2
 public ColumnSet(Column[] columns)
 {
     this.columns = columns;
 }