/// <summary> /// Initialize the DatabaseRow with a single row form a Halide.H3Reader object. /// </summary> /// <param name="reader">An open Halide.H3Reader object that can be used to read a row from a database.</param> public DatabaseRow(H3Reader reader) { _fieldCount = reader.FieldCount; try { _dataItems = new DatabaseItem[_fieldCount]; if (_dataIndex != null) _dataIndex.Clear(); for (int x = 0; x < _fieldCount; x++) { _dataItems[x] = new DatabaseItem(); String columnName = reader.ColumnName(x).ToLower(); _dataIndex.Add(columnName, x); _dataItems[x].IsNullable = reader.GetColumnAllowNulls(columnName); _dataItems[x].ColumnName = columnName; _dataItems[x].ColumnSize = reader.GetColumnSize(columnName); _dataItems[x].ColumnSQLType = reader.GetDataTypeName(columnName).ToLower(); _dataItems[x].IsAutoIncrementing = reader.GetColumnIsAutoIncrement(columnName); _dataItems[x].IsIdentity = reader.GetColumnIsIdentity(columnName); _dataItems[x].IsPrimaryKey = reader.GetColumnIsKey(columnName); _dataItems[x].SystemDataType = reader.GetColumnSystemDataType(columnName).ToLower(); _dataItems[x].Value = reader.GetString(columnName); } } catch { } }