asp.net向数据库输入数据的是提示: 将参数值从 String 转换到 Decimal 失败。
我的decimal参数都是有值的,然后就提示这个了[FormatException:输入字符串的格式不正确。]System.Number.StringToNumber(S...
我的decimal参数都是有值的,然后就提示这个了
[FormatException: 输入字符串的格式不正确。]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2753251
System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt) +119
System.Decimal.Parse(String s, NumberStyles style, IFormatProvider provider) +37
System.Convert.ToDecimal(String value, IFormatProvider provider) +50
System.String.System.IConvertible.ToDecimal(IFormatProvider provider) +10
System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +2562400
System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) +561
[FormatException: 将参数值从 String 转换到 Decimal 失败。]
System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) +608
System.Data.SqlClient.SqlParameter.GetCoercedValue() +29
System.Data.SqlClient.SqlParameter.Validate(Int32 index) +68
System.Data.SqlClient.SqlCommand.BuildParamList(TdsParser parser, SqlParameterCollection parameters) +145
System.Data.SqlClient.SqlCommand.BuildExecuteSql(CommandBehavior behavior, String commandText, SqlParameterCollection parameters, _SqlRPC& rpc) +253
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
SqlHelper.ExecuteNonQuery(String cmdText, SqlParameter[] commandParameters) in e:\Web1\App_Code\SqlHelper.cs:72
Manage_School_StudentEdit.btnSave_Click(Object sender, ImageClickEventArgs e) in e:\Web1\Manage\School\StudentEdit.aspx.cs:873
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +105
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102 展开
[FormatException: 输入字符串的格式不正确。]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2753251
System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt) +119
System.Decimal.Parse(String s, NumberStyles style, IFormatProvider provider) +37
System.Convert.ToDecimal(String value, IFormatProvider provider) +50
System.String.System.IConvertible.ToDecimal(IFormatProvider provider) +10
System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +2562400
System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) +561
[FormatException: 将参数值从 String 转换到 Decimal 失败。]
System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) +608
System.Data.SqlClient.SqlParameter.GetCoercedValue() +29
System.Data.SqlClient.SqlParameter.Validate(Int32 index) +68
System.Data.SqlClient.SqlCommand.BuildParamList(TdsParser parser, SqlParameterCollection parameters) +145
System.Data.SqlClient.SqlCommand.BuildExecuteSql(CommandBehavior behavior, String commandText, SqlParameterCollection parameters, _SqlRPC& rpc) +253
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
SqlHelper.ExecuteNonQuery(String cmdText, SqlParameter[] commandParameters) in e:\Web1\App_Code\SqlHelper.cs:72
Manage_School_StudentEdit.btnSave_Click(Object sender, ImageClickEventArgs e) in e:\Web1\Manage\School\StudentEdit.aspx.cs:873
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +105
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询