Server Error in '/TimeTracker' Application.
--------------------------------------------------------------------------------
The DELETE statement conflicted with the REFERENCE constraint "FK_TimeTracker_TimeEntry_IssueTracker_ProjectCategories". The conflict occurred in database "C:\TIMETRACKER\APP_DATA\TIMETRACKER.MDF", table "dbo.aspnet_starterkits_TimeEntry", column 'CategoryId'.
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: The DELETE statement conflicted with the REFERENCE constraint "FK_TimeTracker_TimeEntry_IssueTracker_ProjectCategories". The conflict occurred in database "C:\TIMETRACKER\APP_DATA\TIMETRACKER.MDF", table
"dbo.aspnet_starterkits_TimeEntry", column 'CategoryId'.
The statement has been terminated.
Source Error:
Line 636: sqlCmd.Connection = cn
Line 637: cn.Open()
Line 638: sqlCmd.ExecuteScalar()
Line 639:
Line 640: End Using
But my problem is not solve.Now i find a new issue also about Category. When I edit something ,then clink the button of "Edit",there have error:categoryName
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.
xzf2001
Member
8 Points
6 Posts
one error when i del a Category.
Feb 12, 2009 01:57 AM|LINK
One error when i del a Category.
the report is:
Server Error in '/TimeTracker' Application.
--------------------------------------------------------------------------------
The DELETE statement conflicted with the REFERENCE constraint "FK_TimeTracker_TimeEntry_IssueTracker_ProjectCategories". The conflict occurred in database "C:\TIMETRACKER\APP_DATA\TIMETRACKER.MDF", table "dbo.aspnet_starterkits_TimeEntry", column 'CategoryId'.
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: The DELETE statement conflicted with the REFERENCE constraint "FK_TimeTracker_TimeEntry_IssueTracker_ProjectCategories". The conflict occurred in database "C:\TIMETRACKER\APP_DATA\TIMETRACKER.MDF", table "dbo.aspnet_starterkits_TimeEntry", column 'CategoryId'.
The statement has been terminated.
Source Error:
Line 636: sqlCmd.Connection = cn
Line 637: cn.Open()
Line 638: sqlCmd.ExecuteScalar()
Line 639:
Line 640: End Using
who can help me?Thanks very much!
chetan.sarod...
All-Star
65839 Points
11163 Posts
Re: one error when i del a Category.
Feb 12, 2009 02:28 AM|LINK
http://msdn.microsoft.com/en-us/library/aa276139(SQL.80).aspx
Refer this guide
http://msdn.microsoft.com/en-us/library/ms972955.aspx
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
xzf2001
Member
8 Points
6 Posts
Re: one error when i del a Category.
Feb 12, 2009 04:57 AM|LINK
Thank you for this link.
But my problem is not solve.Now i find a new issue also about Category. When I edit something ,then clink the button of "Edit",there have error:categoryName
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.NullReferenceException: categoryName
Source Error:
Line 322:
Line 323: If String.IsNullOrEmpty(CategoryName) Then
Line 324: Throw New NullReferenceException("categoryName")
Line 325: End If
Line 326:
chetan.sarod...
All-Star
65839 Points
11163 Posts
Re: one error when i del a Category.
Feb 13, 2009 02:29 AM|LINK
You can try this
If String.IsNullOrEmpty(CategoryName) Then
//Here you can show the user friendly message like
Response.Write("Please select CategoryName");
End If
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
chetan.sarod...
All-Star
65839 Points
11163 Posts
Re: one error when i del a Category.
Mar 26, 2009 03:23 AM|LINK
Can you updated the status of your thread
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
chetan.sarod...
All-Star
65839 Points
11163 Posts
Re: one error when i del a Category.
Apr 15, 2009 03:23 AM|LINK
Can you update the status of thread
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.