Ask Your Question

Creating relationships in Base [closed]

asked 2017-03-28 18:36:49 +0100

rymong gravatar image

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.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-09-28 19:04:45.277150


The attached sample is damaged and cannot be opened normally.

Ratslinger gravatar imageRatslinger ( 2017-03-28 18:40:18 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-03-28 19:16:15 +0100

Ratslinger gravatar image

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.

edit flag offensive delete link more


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.

Ratslinger gravatar imageRatslinger ( 2017-03-28 20:16:04 +0100 )edit

Question Tools

1 follower


Asked: 2017-03-28 18:36:49 +0100

Seen: 2,899 times

Last updated: Mar 28 '17