Jump to content

Deleting Found set deletes all matching records


This topic is 1541 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a large DB of over 400k records. I have a found set of records I want to delete - only 500 records. When I click 'delete' the db churns away for about 20 minutes and eventually deletes 40k records - that's to say all other records which match one field in the found set - this is a big problem. Is it a bug - what's going on?

Link to comment
Share on other sites

The only way that FM will delete more records than those strictly in your found set, is if the "cascading delete" option is turned on in any relationships based on the TO of the layout where you do the deletes. Or for TOs based on the same basetable.

So check your relationships first.  If you have no cascading deletes then can you provide some more info on what you mean by 

21 minutes ago, enquirerfm said:

that's to say all other records which match one field in the found set

 

Link to comment
Share on other sites

TO = Table Occurrence, the blocks on the graph.  Layouts are based on TOs, TOs are based on tables.

One table can have many TOs, one TO can have many layouts.

The 'cascading delete' option is set on the relationship definition between two TOs.  Bottom half of that dialog, the options exists for the left-hand side of the relationship and the right-hand side of the relationship.  And no: it is off by default.

But it is the only way that FM would delete more records than are in your found set.  If you are not using cascading deletes then something else is going on and I doubt very much that it is a bug.  But you'll have to provide some very specific examples of what is happening.

Perhaps start by creating a dummy file with some of the same data and see if it happens there. 

Link to comment
Share on other sites

  • 1 month later...

hi thanks for your reply I have a workaround but it is not fool proof and something is definitely going on - none of the cascading deletes are on. I can't think why I would have turned it on either. I will create a dummy file from the main one and see what happens.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.