Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2008
    Posts
    11

    Unanswered: Acess error can't append

    Hi
    I am trying to insert data into 1 of my table and I get this error:
    Microsoft Access can't append all the records in the append query.
    Microsoft Access set 0 fields to Null due to type conversion failure, and it didn't add 1 records to the table due to key violation, 0 records due to lock violation, and 0 records due to validation rule violation.

    My design is:

    Create table MANUFACTURER(
    Manuf_name char(16) Not Null,
    Manufacture_id Varchar(2) Not Null,
    Primary Key (Manufacture_id));

    Create table MODELS(
    Model_name varchar(16) Not Null,
    Model_id Varchar(2) Not Null,
    Manufacture_id Varchar(2) Not Null,
    Primary Key (Model_id),
    FOREIGN Key (Manufacture_id) REFERENCES MANUFACTURER);

    Create table OPTIONS(
    option_name varchar(16) Not Null,
    option_id Varchar(2) Not Null,
    Primary Key (option_id));

    Create table CAR(
    year varchar(4) Not Null,
    car_id Varchar(3) Not Null,
    color char (20) Not Null,
    Manufacture_id Varchar(2) Not Null,
    Model_id Varchar(2) Not Null,
    stock_num varchar (3) Not Null,
    price float Not Null,
    mileage varchar (10) Not Null,
    Vin_num varchar (7) Not Null,
    Primary Key (Vin_num),
    Foreign Key (car_id) references CAR_OPTIONS,
    Foreign Key (Manufacture_id) references MANUFACTURER,
    Foreign Key (model_id) references MODELS);

    Create table CAR_OPTIONS (
    car_id Varchar(3) Not Null,
    option_id Varchar(3) Not Null,
    Primary Key (car_id),
    Foreign Key (option_id) references OPTIONS);

    This occurs when I try to add data into the car or CAR_OPTIONS table
    Please help..

    I need this urgently

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    "and it didn't add 1 records to the table due to key violation" I believe means that either you are trying to add a record which would duplicate your primary key field (ie. no duplicates) or that you're trying to add a record where the primary key value is blank.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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