MySQL null/empty-string too long for VarChar(5) ?
- by rlb.usa
I have a stored procedure that takes an input var_zip varchar(5). My webapp calls this procedure and gives it the parameter:
cmd.Parameters.Add(new MySqlParameter("var_Zip", MySqlDbType.VarChar, 5));
cmd.Parameters["var_Zip"].Value = txtZip.Text;
txtZip is empty. So it is either giving empty string '', or null. Doesn't matter to me which.
But…