This is the code.
CODE 1: cmd.Parameters.Add("@RateCenterID", OleDbType.Integer).Value = Convert.ToInt32(ratecenterid.Text);
CODE 2: cmd.Parameters.Add("@QuantityThreshold", OleDbType.Integer).Value = Convert.ToIn32(quantityThreshold.Text);
I get the following error in the CODE 2 but not in CODE 1
Error: Value was either too large or too small for an Int32.
kindly help me
Regards,
Arjun
Try entering a smaller or larger value in the
quantityThresholdtext box.Update
Okay, reading your comment response to Saeed Amiri,
4036953909is too large for anint– it’s range is-2147483648to2147483647You could use a
uintwhich has a range0to4294967295Although you will likely need to change the parameter type to
OleDbType.UnsignedIntas well.