Ask Your Question
0

To what error does code 177 point? [closed]

asked 2014-05-22 16:24:31 +0200

smrw gravatar image

updated 2015-09-06 00:04:51 +0200

Alex Kemp gravatar image

I am using v.4.2.3.3 and am trying to relate two tables in base. The fields I am using are of the same type and one is a key. The error message I get is 177: integrity constraint violation - no parent. This must mean something - does anyone out there know? SMRW

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 2016-02-23 19:39:08.988051

Comments

Found it! The answer is, of course, in the manual. I was relating two tables which already had some data in them. The key field side (1) was set to auto-increment. As I fluffed entering one record (tried to back-track before entering a non-null field) the auto counter skipped that number (14) and went on to 15. The other table (the 'n' side) had a record with number 14 in the linked field. I had entered this manually not noticing that the key had gone on to 15. Hence the message "no parent 14". I should have read the manual sooner. A lesson here, I think. SMRW

smrw gravatar imagesmrw ( 2014-06-02 20:03:26 +0200 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2014-05-25 00:21:19 +0200

frofa gravatar image

updated 2014-05-25 06:18:49 +0200

From the screenshot you provide, I notice that the PK 'key' in your congregation table is the parent of two foreign keys (FKs) in two separate tables (i.e. the tables TalksGiven and Speakers). Logically that means that the contents of your TalksGiven:Where column and your Speakers:Congregation column must be identical (i.e. redundant). Is that really what you intend? (Why do you need to store the same information twice?) I suspect your error message might be linked to this aspect of your design. How are you populating the contents of your TalksGiven:Where and Speakers:Congregation columns - are you using LIST BOXES on sub-form?

Anyway, what happens if you DELETE the 1:n constraint between Congregation:Key and TalksGiven:Where? Can you then make the 1:n link between Speakers:Key and TalksGiven:SpeakerRef?

edit flag offensive delete link more

Comments

Hi, Frofa. Thanks for your help. I tried deleting various relationships, but the one stayed vehemently incompatible. However I think you have shown me where the problem lies: my unfamiliarity with the medium. My contact with relational databasing has to date been conducted in 4GL rather than SQL. I have therefore downloaded the manual and shall endeavour to digest that. "If all else fails, consult the manual"! -SMRW

smrw gravatar imagesmrw ( 2014-05-26 21:17:16 +0200 )edit

Hi SMRW: If you post a link so I can download your 'sample' database file (please remove any sensitive data if necessary) I will have a look at your design/scheme to see if I can figure out the cause of the error message. See the postings by Drew Jensen in this tutorial for a bit more info on integrity constraints and how they work in Base. NOTE: You don't need to impose such constraints to get form-based filtering to work using the PK and FK relationships.

frofa gravatar imagefrofa ( 2014-05-27 02:24:14 +0200 )edit
0

answered 2014-05-22 20:55:53 +0200

m.a.riosv gravatar image

I think in this link in the Aoo forum there is useful information:

Using two tables in one form

edit flag offensive delete link more
0

answered 2014-05-22 22:00:20 +0200

smrw gravatar image

updated 2014-05-23 21:43:04 +0200

Ah, yes. I have four tables and I am trying to make the relations I need between them to pull up the data I need. In each relation I have an integer key field in one table relating to a non-key field of similar type in another table. I am trying to make four links. Three of them work, but the fourth refuses to with this error message 177 regarding lack of parentage, whatever that is. Here is a link to a screen shot: https://www.dropbox.com/s/taco2xnydpn... I am trying to link the key field in 'Speakers' to 'SpeakerRef' in 'TalksGiven' They are both integer fields.

edit flag offensive delete link more

Comments

It would help if we had a clearer idea of what you mean by 'am trying to relate two tables in base'. Would you kindly clarify your database schema. Perhaps post a screenshot of your tables in the RELATIONSHIPS window. (It sounds like a key problem, though).

frofa gravatar imagefrofa ( 2014-05-23 04:25:51 +0200 )edit

Question Tools

2 followers

Stats

Asked: 2014-05-22 16:24:31 +0200

Seen: 787 times

Last updated: May 25 '14