Input string was not in a correct format , with form 1 and 2
为什么说mscorlib.dll中发生"system.formatException"类型的未处理异常
其他信息:输入字符串的格式不正确。
这是我的密码
1 2 3 4 5 6 7 8 9 10 11 12 | public int transCode = 0; con.Open(); cmd = new SqlCommand("SELECT MAX(TransactionCode) FROM TRANSACTIONS",con); rdr = cmd.ExecuteReader(); while (rdr.Read()) { transCode = Convert.ToInt32(rdr[0].ToString()); // Here is the line where the problem go } con.Close(); |
这个例外意味着由