Example #1
0
        private static string stringify(AdomdDataReader row, int i)
        {
            if (row.IsDBNull(i))
            {
                return(null);
            }

            var type = row.GetFieldType(i);

            if (type == typeof(byte[]) || type == typeof(char[]))
            {
                return(Convert.ToBase64String((byte[])row.GetValue(i)));
            }
            else if (type == typeof(IDataReader))
            {
                return("<IDataReader>");
            }
            return(row.GetValue(i).ToString());
        }