มันขึ้นแบบนี้ครับ ทำไงดี แก้ยังไง รบกวนด้วยครับ (ผมทำโปรเจคอยู่ครับ ใกล้ส่งแล้วด้วย!!!)
String or binary data would be truncated.
The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.
Source Error:
Line 17: srcCustomerProfile.InsertParameters("M_ZipCode").DefaultValue = txtZipcode.Text
Line 18: srcCustomerProfile.InsertParameters("M_UserName").DefaultValue = txtUsername.Text
Line 19: srcCustomerProfile.Insert()
Line 20: Roles.AddUserToRole(txtUsername.Text, "Member")
Line 21: Microsoft.VisualBasic.MsgBox("การสมัครสมาชิกเสร็จสมบูรณ์", MsgBoxStyle.OkOnly, "กนกวิมาน สปอร์คลับ")
Source File: D:\Project 442\WebSite Kanok\Register.aspx Line: 19
Stack Trace:
[SqlException (0x80131904): String or binary data would be truncated.
The statement has been terminated.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +109
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +57
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2433
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +148
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +949
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +242
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +289
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +117
System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +377
System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values) +235
System.Web.UI.WebControls.SqlDataSource.Insert() +16
ASP.register_aspx.btnSubmit_Click(Object sender, EventArgs e) in D:\Project 442\WebSite Kanok\Register.aspx:19
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +78
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +100
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2863Tag : - - - -
Date :
2009-04-19 09:13:03
By :
oasiis
View :
1731
Reply :
1
ลองตรวจสอบค่าของ ฟิวด์ กับค่า ที่กำหนดค่าให้ ฟิวด์ นั้นถูกต้องตามชนิดของข้อมูลหรือเปล่าน่ะครับ
Date :
2009-04-19 09:52:24
By :
webmaster
Load balance : Server 03