ADOX - Creating Tables and Foreign Keys

  • Thread starter Douglas Marquardt
  • Start date
D

Douglas Marquardt

Hi All:

Using ADOX, I've successfully created a database and
all the required tables, indexes, FKs, etc.
However, on one of the tables when I try and insert a record
(via ADO and SQL insert statement) I get the following error:

[OLE/DB provider returned message: You cannot add or change a record because
a related record is required in table 'Modification'.]

There is an "ID" field in the Modification table, and a FK to it from
the main table on "ModificationID" field.

There are NO records in the modification table, and I the ModificationID
in the insert statement is NULL -- so why would I be getting this error?
Is there some setting on the FK I need to change that will allow a record
to be added to the main table with the ModificationID set to Null?

Doug.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top