Integrity constraint violation
Results 1 to 2 of 2

Thread: Integrity constraint violation

  1. #1
    Join Date
    Mar 2003
    Posts
    3

    Integrity constraint violation

    I have a database in SQL 7 (after doing a DTS from SQL 2000) and was trying
    to enter some data into the database and I had this error message.

    ODBC Error Code = 23000 (Integrity constraint violation)


    [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL
    into column 'Question01UIN', table
    'wwtbamsgcom_db1.wwtbamsgcom_db1.Question01Main'; column does not allow
    nulls. INSERT fails.



    The error occurred while processing an element with a general identifier of
    (CFQUERY), occupying document position (9:1) to (9:113).

    That column Question01Main does not expect a
    null value to be entered. The existing columns have values in there. I do
    not know why the data entry now tries to insert a null value into the
    column, which will be rejected as we can see.
    Could
    someone perhaps point out what went wrong please? Thanks!

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,858
    Did you get the error during DTS or later?

    If during DTS, make sure that the source and target columns are mapped correctly, sometimes DTS may assume things.

    If you are getting this error after completing DTS while trying to insert a new row, then check the insert statement to see if you are not missing any column data before this particular column.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •