Exemple #1
0
 public override void Close()
 {
     base.Close();
     if (this.outSelect.Length != 0)
     {
         MySqlCommand command       = new MySqlCommand("SELECT " + this.outSelect, base.Connection);
         string       parameterHash = base.command.parameterHash;
         command.parameterHash = parameterHash;
         using (MySqlDataReader reader = command.ExecuteReader())
         {
             for (int i = 0; i < reader.FieldCount; i++)
             {
                 string         parameterName     = reader.GetName(i).Remove(0, parameterHash.Length + 1);
                 MySqlParameter parameterFlexible = base.Parameters.GetParameterFlexible(parameterName, true);
                 reader.values[i] = MySqlField.GetIMySqlValue(parameterFlexible.MySqlDbType);
             }
             if (reader.Read())
             {
                 for (int j = 0; j < reader.FieldCount; j++)
                 {
                     string str3 = reader.GetName(j).Remove(0, parameterHash.Length + 1);
                     base.Parameters.GetParameterFlexible(str3, true).Value = reader.GetValue(j);
                 }
             }
         }
     }
 }
Exemple #2
0
        internal void Serialize(MySqlStream stream, bool binary)
        {
            IMySqlValue iMySqlValue = MySqlField.GetIMySqlValue(this.mySqlDbType);

            if (!binary && ((this.paramValue == null) || (this.paramValue == DBNull.Value)))
            {
                stream.WriteStringNoNull("NULL");
            }
            else
            {
                iMySqlValue.WriteValue(stream, binary, this.paramValue, this.size);
            }
        }