>oCommand.Parameters.Add("@AmendmentNumber") >plus something else to set the value? >AddWithValue does not specify type and length of the parameter and makes the best guess. So, there may be cases when it comes wrong as the one you saw yesterday.
oCommand.Parameters.Add("@ParamName", SqlDbType.Int).Value = ParamValue;For the char, varchar and decimal I can also add a length as 3rd parameter. This is for SqlCommand, for OleDbCommand you need to research the exact syntax which will be similar.