one error when i del a Category.

Last post 04-14-2009 11:23 PM by chetan.sarode. 5 replies.

Sort Posts:

  • one error when i del a Category.

    02-11-2009, 9:57 PM
    • Member
      8 point Member
    • xzf2001
    • Member since 02-12-2009, 2:48 AM
    • Posts 6

    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!
     

  • Re: one error when i del a Category.

    02-11-2009, 10:28 PM
    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: one error when i del a Category.

    02-12-2009, 12:57 AM
    • Member
      8 point Member
    • xzf2001
    • Member since 02-12-2009, 2:48 AM
    • Posts 6

    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:
     

  • Re: one error when i del a Category.

    02-12-2009, 10:29 PM

    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

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: one error when i del a Category.

    03-25-2009, 11:23 PM

    Can you updated the status of your thread

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: one error when i del a Category.

    04-14-2009, 11:23 PM

    Can you update the status of thread

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
Page 1 of 1 (6 items)