Creating relationships in Base

Ucanal Database v023-119.odb


I am trying to tie the different tables in an archaeological database together using Relationships, but I keep getting an error when I try to create one. Can you assist?

An example: “Name” column in ANCIENTITEM to “Lot” Column in Lot Table
This would tie our information for each lot to the ceramics found in that lot.

Error: Column types do not match in statement [ALTER TABLE “Lot Table” ADD FOREIGN KEY (“Lot”) REFERENCES “ANCIENTITEM” (“NAME”)]

Forgive me, I’m not knowledgeable about relationships, keys, etc.

The attached sample is damaged and cannot be opened normally.

Without the sample or further information on the involved fields an answer will be difficult. However, I still have the old sample from last year. This sample does not have the “ANCIENTITEM” table and the “Lot Table” may have since changed.

What I do see from what I have is the “Lot” field in the “Lot Table” is a field of type Integer. It would appear the “NAME” field in “ANCIENTITEM” table would be of type varchar (alpha/numeric). The two fields must be a match in both type and content.

The ALTER statement in itself is syntactically correct.


What may also help is the documentation found on this site - click here. Refer to Chapter 3 Tables. There is a section labeled Linking Tables. Also same chapter section on Relationships between tables.