public string GetString(int index)
        {
            MySqlValue fieldValue = this.GetFieldValue(index, true);

            if (fieldValue is MySqlBinary)
            {
                return((this.currentResult[index] as MySqlBinary).ToString(this.fields[index].Encoding));
            }
            return(fieldValue.ToString());
        }
Beispiel #2
0
        /// <include file='docs/MySqlDataReader.xml' path='docs/GetString/*'/>
        public String GetString(int index)
        {
            MySqlValue  val = GetFieldValue(index);
            MySqlString str = (val as MySqlString);

            if (str != null)
            {
                return(str.Value);
            }

            if (val is MySqlBinary)
            {
                return((currentResult[index] as MySqlBinary).ToString(fields[index].Encoding));
            }

            return(val.ToString());
        }