Results 1 to 10 of 10

Thread: Insert error

  1. #1
    Join Date
    Oct 2004
    Posts
    12

    Unanswered: Insert error

    Hi

    I have imported to sql my db and it worked fine.
    After i developed the diagram (relations in SQL S).

    Now, with my .mde front-end i connected via-DSN and, again, it worked fine.

    I started the tests and problems:
    1. I have a relation 1 to 1 - in the .mde i have a ctlSeparator with both tables but i'm getting always the same error (3621)- and says that i can't insert a null value in my field (primary key in both table). Why?

    2. Should i perform something to correct this problem. Sould i change (besides DAO to ADO) in my .mde?

    help

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Is this Access or SQL Server?

    Where the INSERT statement that's causing the problem.

    The DDL of the tables would be helpful to see as well.
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Oct 2004
    Posts
    12
    Hi

    In Access!
    I'll attach the mesage and the access'form.

    My relation 1 to 1 is from Table PROJECTOS - Table ANALISE PREVIA (linked by ID_Projecto).
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Did you upgrade from Access to SQL Server?

    In any case, my guess is that the id is not in the insert (where's that code btw?) and needs to be an autonumber or IDENTITY Column.

    Is the Data now in SQL Server?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Oct 2004
    Posts
    12
    Thats correct. Thanks.
    My problem was that the primary key wasn't identity and this one no.
    Can you explain the differences between Int Identity and (only) Int?

  6. #6
    Join Date
    Oct 2004
    Posts
    12
    Quote Originally Posted by Brett Kaiser
    Did you upgrade from Access to SQL Server?

    In any case, my guess is that the id is not in the insert (where's that code btw?) and needs to be an autonumber or IDENTITY Column.

    Is the Data now in SQL Server?
    Thats correct. Thanks.
    My problem was that the primary key wasn't identity and this one no.
    Can you explain the differences between Int Identity and (only) Int?

  7. #7
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    It didn't make your autonumber in to an IDENTITY

    The easiest way would be to go in to Enterprise manager, design the table, and enable the IDENTITY Column.

    Do you have the Client side tools installed?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  8. #8
    Join Date
    Oct 2004
    Posts
    12
    Little newby problems!!

    Tools? No! That's necessary for what?

  9. #9
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Did you install sql server on your machine?

    What version of sql server is it?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  10. #10
    Join Date
    Oct 2004
    Posts
    12
    No.
    SQL Server 2000.

Posting Permissions

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