private void LoadResult(DataTable dt, IDataReader reader, DataAccessBase Dab, bool ReportProgress)
        {
            DataTable schema = reader.GetSchemaTable();
            foreach (DataRow row in schema.Rows)
            {
                Type t = (Type)row["DataType"];
                if (t == typeof(byte[]))
                {
                    t = typeof(string);
                }
                DataColumn col = new DataColumn(row["ColumnName"].ToString(), t);
                dt.Columns.Add(col);
            }

            int rowCount = 0;

            while (reader.Read())
            {
                object[] vals = new object[dt.Columns.Count];
                foreach (DataColumn col in dt.Columns)
                {
                    if (reader[col.Ordinal].GetType() == typeof(byte[]))
                        vals[col.Ordinal] = BitConverter.ToString((byte[])reader[col.Ordinal]);
                    else
                        vals[col.Ordinal] = reader[col.Ordinal];
                }

                dt.LoadDataRow(vals, false);

                if (ReportProgress && ++rowCount == 1000)
                    Dab.OnRunQueryRowCreated(dt.AsDataView().ToTable());
            }
        }