473,657 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Referential Integrity that isn't

I seem to have gotten myself into a bit of a pickle. I am trying to
delete a record from a table attached to a form, and it complains
about not being able to delete a record in a table because "the record
cannot be deleted because table sales includes related records"
Cascade deletes and referential integrity right?

Well no. The table I am deleting out of has NO referential integrity
with ANY other table. I tried renaming and deleting the table and all
to no avail.

Here is my situation

Table1 is Sales and it has a company ID in it
Table2 is Company Table with company ID
Table3 is kind of a join with branches and headquarters of Companies.
It has ONLY the company ID of the headquarter and that of the branch

Table1 IS related to Table2 with RI (no cascade updates or deletes...)

The form for maintaining Table3 is a join on Company twice for the
purpose of displaying the names of the branch and headquarter company
for the user

Table2 Table3 Table2_1
ID-----------ID
Name SubID----------ID
Name
Then we display Table3.ID, Table2.Name, Table3.SubID, Table2_1.name as
subname

When I try to delete any record I get the can't delete record. If I
don't create the record source with the wierd 3 table join, it deletes
fine.

Ideas?

Thanks in Advance
Bob Rogers
Nov 12 '05 #1
2 1550
I have seen this before. Try compacting the database then try deleting
table.

--
Dean Covey
www.coveyaccounting.com

MS-Office Certified:
http://www.microsoft.com/learning/mc...st/default.asp

"Bob Rogers" <mi******@hevan et.com> wrote in message
news:91******** *************** ***@posting.goo gle.com...
I seem to have gotten myself into a bit of a pickle. I am trying to
delete a record from a table attached to a form, and it complains
about not being able to delete a record in a table because "the record
cannot be deleted because table sales includes related records"
Cascade deletes and referential integrity right?

Well no. The table I am deleting out of has NO referential integrity
with ANY other table. I tried renaming and deleting the table and all
to no avail.

Here is my situation

Table1 is Sales and it has a company ID in it
Table2 is Company Table with company ID
Table3 is kind of a join with branches and headquarters of Companies.
It has ONLY the company ID of the headquarter and that of the branch

Table1 IS related to Table2 with RI (no cascade updates or deletes...)

The form for maintaining Table3 is a join on Company twice for the
purpose of displaying the names of the branch and headquarter company
for the user

Table2 Table3 Table2_1
ID-----------ID
Name SubID----------ID
Name
Then we display Table3.ID, Table2.Name, Table3.SubID, Table2_1.name as
subname

When I try to delete any record I get the can't delete record. If I
don't create the record source with the wierd 3 table join, it deletes
fine.

Ideas?

Thanks in Advance
Bob Rogers

Nov 12 '05 #2
Well, I'll be hornswaggled!!! thank you Dean. That does in fact seem
to do it. Yet another case of Access remembering too many things for
it's own good.
I have seen this before. Try compacting the database then try deleting
table.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
276
by: Bob Rogers | last post by:
I seem to have gotten myself into a bit of a pickle. I am trying to delete a record from a table attached to a form, and it complains about not being able to delete a record in a table because "the record cannot be deleted because table sales includes related records" Cascade deletes and referential integrity right? Well no. The table I am deleting out of has NO referential integrity with ANY other table. I tried renaming and deleting...
1
3670
by: Grant McLean | last post by:
Hi First a simple question ... I have a table "access_log" that has foreign keys "app_id" and "app_user_id" that reference the "application_type" and "app_user" tables. When I insert into "access_log", the referential integrity triggers generate these queries: SELECT 1 FROM ONLY "public"."application_type" x
6
2492
by: Greg Stark | last post by:
There's another poster complaining about referential integrity checks causing deadlocks. Unfortunately I've deleted the message so this response (and the archives aren't responding) isn't going to show up on the right thread. The reason the deadlock is happening is because of a known deficiency in Postgres that postgres has to take an exclusive lock on the records to ensure they aren't deleted before your insert/update commits....
7
2459
by: Jimmie H. Apsey | last post by:
Referential Integrity on one of our production tables seems to have been lost. I am running Postgres 7.1.3 embedded within Red Hat kernel-2.4.9-e.49. Within that I have a table with referential integrity constraints which no longer work. I do not know how to disable referential integrity on a column in a table. I do not know how to view what Postgres thinks my referential integrity
5
4009
by: Geisler, Jim | last post by:
So, as far as I know, PostgreSQL does not have any way of verifying the loss of referential integrity. Are there any recommended methods or utilities for checking referential integrity in a PostgreSQL database?
6
4713
by: heyvinay | last post by:
I have transaction table where the rows entered into the transaction can come a result of changes that take place if four different tables. So the situation is as follows: Transaction Table -TranId -Calc Amount Table 1 (the amount is inserted into the transaction table) - Tb1Id
80
7854
by: Andrew R | last post by:
Hi I'm creating a series of forms, each with with around 15-20 text boxes. The text boxes will show data from tables, but are unbound to make them more flexible. I want the form to be used for both adding new data and modifying existing data. I have created a save button on the form. When the user clicks the save button, the code checks to see if there
3
3771
by: moskie | last post by:
Is there a way to run an alter table statement that adds a constraint for a foreign key, but does *not* check the existing data for refrential integrity? I'm essentially looking for the equivalent to SQL Server's NOCHECK flag. I am able to create equivalent keys in the Relationships screen, as long as the "Enforce referential integrity" box is left unchecked. But when I try to create that relationship with an ALTER TABLE statement, I...
6
4496
by: CPAccess | last post by:
How do I maintain referential integrity between a main form and a subform, each based upon different (but joined with integrity enforced) table? Here's the situation: I have two tables: tblContracts and tblPayments. tblContracts has an autonumber field called IDKey as its primary key. tblPayments also has an IDKey field (Integer datatype). The two tables are linked in a one-to-many relationship on the field IDKey with referential integrity...
2
3916
by: ApexData | last post by:
Access2000, using a continuous form. I’m getting a message that say “you cannot add or change a record because a related record is required in table Employee”. This occurs in all my combobox fields that have referential integrity linked to another table. I do not have the field in the table set as required, and I do not want to require the entry. If the record is filled out completely and added to the table, you can go back to the...
0
8413
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7352
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.