Ask Your Question

Creating relationships in Base

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

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 close merge delete


The attached sample is damaged and cannot be opened normally.

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

1 Answer

Sort by » oldest newest most voted

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

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 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


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

Seen: 1,645 times

Last updated: Mar 28 '17