Cant get rid of Temp Forms

Moderators: Phil Winkler, Graham Smith, Pete Tabord

Cant get rid of Temp Forms

Postby Neil Moores » Mon Nov 13, 2017 2:56 pm

Anyone any ideas how to get rid of some Temp Forms that don't want to go away.

I've tried my usual methods by running - delete table “Temp Form 287” .

and also run:

for Application Objects with Object name = "[NameOfTheForm]" ;
list records
Object Name ;
File Name .
end

but there is nothing in the report to which I would normally add delete records to.
Neil Moores
 
Posts: 110
Joined: Wed Apr 02, 2008 10:14 pm
Has thanked: 2 times
Been thanked: 0 time
 

Re: Cant get rid of Temp Forms

Postby Neil Moores » Mon Nov 13, 2017 3:35 pm

Just tried deleting all the dos style file names relating to the Temp Form and then running, delete table "Temp Form 287" . This seems to have worked but I would prefer an easier way if there is one. I have about 10 Temp Forms to deal with.
Neil Moores
 
Posts: 110
Joined: Wed Apr 02, 2008 10:14 pm
Has thanked: 2 times
Been thanked: 0 time
 

Re: Cant get rid of Temp Forms

Postby Gil Fleming » Mon Nov 13, 2017 3:39 pm

That sounds like a neat trick Neil. Temp forms are a real messy area of ffenics. I can understand the need for their creation, but there should be a mechanism to clear them out when no longer needed.
Gil Fleming
Director
Fleming Technical Limited

You can't think about what you don't know - Mike Fidler
If you can't fight, wear a big hat - John S Fleming
The best way to have a good idea is to have lots of ideas - Linus Pauling
Gil Fleming
 
Posts: 546
Joined: Tue May 15, 2012 10:26 am
Location: Liverpool, UK
Has thanked: 1 time
Been thanked: 2 times
 

Re: Cant get rid of Temp Forms

Postby Adrian Jones » Mon Nov 13, 2017 4:24 pm

Hi Neil,

Your routine is about as neat as you can get on this one. Gil is right that there should be a better management option for these.

There is also a variation on a theme where even this route does not delete the entry. If you find this issue happening for you, then I have a workaround, but it's a bit involved so I'll leave the idea parked for the mo.
User avatar
Adrian Jones
 
Posts: 2000
Joined: Tue Sep 11, 2007 2:38 pm
Location: Cornwall, UK
Has thanked: 5 times
Been thanked: 4 times
 

Re: Cant get rid of Temp Forms

Postby Neil Moores » Mon Nov 13, 2017 5:03 pm

Thanks for the replies fellas - I'll get stuck in and do it the long way. Funny thing is that they do normally go the easy way, I don't know what's changed this time.
Neil Moores
 
Posts: 110
Joined: Wed Apr 02, 2008 10:14 pm
Has thanked: 2 times
Been thanked: 0 time
 

Re: Cant get rid of Temp Forms

Postby Pete Tabord » Thu Nov 23, 2017 4:12 pm

The reason temp forms (as opposed to temp files) are not deleted automatically is because they occur as a result of something going wrong. They may, on occasion, be the only way of getting data back short of a restore.
Peter J. Tabord
Head of Development
Database Software Ltd.
ptabord@ffenics.com
Pete Tabord
 
Posts: 1881
Joined: Fri Sep 07, 2007 12:48 pm
Location: Caernarfon, Gwynedd, UK
Has thanked: 0 time
Been thanked: 3 times
 

Re: Cant get rid of Temp Forms

Postby Neil Moores » Sat Nov 25, 2017 3:55 pm

It appeared to have deleted each of the Temp Forms until I restarted the program and they re-appeared again. I would greatly appreciate details of your workaround Adrian.
Neil Moores
 
Posts: 110
Joined: Wed Apr 02, 2008 10:14 pm
Has thanked: 2 times
Been thanked: 0 time
 

Re: Cant get rid of Temp Forms

Postby Adrian Jones » Tue Dec 05, 2017 2:41 pm

Hi Neil,

If I can remember! Try these ideas, but make sure you have a backup and play with my suggestions if they're not 100%.

This is my recollection. I think the Delete Table routine checks whether the files associated with the table are somehow 'valid', and if they are not, fails without telling you.

How the files might be invalid is not really here nor there.

So my workaround is to work out what the TDF (the definition file) and possibly DBM (the data file) would be called. Ffenics, like DataEase, names the files [FIRST FOUR LETTERS][DB LETTER][ALPHA SEQUENCE x 3].DBM or TDF. So a TEMP FORM 123 might have coresponding files like TEMPQAAC.TDF, where Q is the database letter, etc.

My workaround when the delete table routine fails is to fake the files. I do this by taking a known valid TDF (and possibly DBM), copying it and renaming it to match the name the delete table routine is looking for.

I can't remember if the DBM is needed -- you'll have to test for that. I'm pretty sure you don't need to worry about indexes.

Does that make sense?

I suggest you exit and reenter the application each time you try this to confirm that it has worked.
User avatar
Adrian Jones
 
Posts: 2000
Joined: Tue Sep 11, 2007 2:38 pm
Location: Cornwall, UK
Has thanked: 5 times
Been thanked: 4 times
 

Re: Cant get rid of Temp Forms

Postby Gil Fleming » Tue Dec 05, 2017 2:45 pm

It's a pity that DSL don't produce a toolkit for this, or at least create some internal facility for housekeeping. They will probably read this post in about 12 months and then unilaterally decide that it's not something that people want.
Gil Fleming
Director
Fleming Technical Limited

You can't think about what you don't know - Mike Fidler
If you can't fight, wear a big hat - John S Fleming
The best way to have a good idea is to have lots of ideas - Linus Pauling
Gil Fleming
 
Posts: 546
Joined: Tue May 15, 2012 10:26 am
Location: Liverpool, UK
Has thanked: 1 time
Been thanked: 2 times
 

Re: Cant get rid of Temp Forms

Postby Neil Moores » Wed Dec 06, 2017 9:53 am

Thanks for that Adrian.

I’ve just had another go but I didn’t have any file names beginning with TEMP. When I looked at the temp forms in More Information/Records they each had a filename based on the original form but with the last character changed for each temp form and only a .DBM with the index files.

However, good news to report. Since last week I had now amassed a total of 18 temp forms so I tried the usual delete table routine starting from the highest one which must have been so corrupt Ffenics crashed when I tried to delete it. Incidentally this temp form was also not showing in the Utilities/Records as a form of any sort.

When I restarted I ignored this really bad one and went backwards down the list one at a time restarting after each deletion and unbelievably they all deleted. Not only that but I did a full reorganise, it went past the really corrupt form and actually finished reorganising. Then I had one last go at the bad one which also deleted as well.

I've tried this so many times without success and can't understand why its worked this time. I'm totally confused but Hey What, happy days and thanks for everyone’s input.
Neil Moores
 
Posts: 110
Joined: Wed Apr 02, 2008 10:14 pm
Has thanked: 2 times
Been thanked: 0 time
 

Re: Cant get rid of Temp Forms

Postby Adrian Jones » Wed Dec 06, 2017 3:49 pm

Actually, the files probably don't start with temp. I've just clicked on a missing one in an app and it looks like the filename would have been related to the original table that resulted in the temp form, so CUSTMAAC.TDF in this case.

Sounds like you have it sorted, but if it happens again, or for anyone else, click on the temp form entry in the procedure picklists.
User avatar
Adrian Jones
 
Posts: 2000
Joined: Tue Sep 11, 2007 2:38 pm
Location: Cornwall, UK
Has thanked: 5 times
Been thanked: 4 times
 

Re: Cant get rid of Temp Forms

Postby Neil Moores » Wed Dec 06, 2017 5:46 pm

I now know why the temp forms wouldn't delete and this may be useful if anyone else is having the same problem. I was running the delete table "temp form 255" . routine from my windows 10 workstation.

When I did manage to remove them yesterday I did so on the Server running 2012 which removed them with no problem.

I have loaded a backup with the temp forms on just to confirm and got the same results.

Perhaps I should have known this and was just stupid, they say a little knowledge is dangerous.
Neil Moores
 
Posts: 110
Joined: Wed Apr 02, 2008 10:14 pm
Has thanked: 2 times
Been thanked: 0 time
 

Re: Cant get rid of Temp Forms

Postby SamT » Mon May 21, 2018 6:18 pm

Pete Tabord wrote:The reason temp forms (as opposed to temp files) are not deleted automatically is because they occur as a result of something going wrong. They may, on occasion, be the only way of getting data back short of a restore.



Pete you are so right. I have many stupid times tried to alter a table on our live system and things have gone badly wrong....you think I would learn not to do this. I have been saved by the Temp form data every time...this is one of the best things about Ffenics.


To remove the temp forms ...I believe they are tables and do not have the true properties of a form To delete I take the table and rename it and save the data and the the relationships and then delete form in DQL .This if memory serves me removes the really helpful Temp Form when you have finished using it.
SamT
 
Posts: 142
Joined: Sat Jan 16, 2010 12:09 pm
Has thanked: 0 time
Been thanked: 0 time
 
 

Return to Ffenics 1.x

Who is online

Users browsing this forum: No registered users and 7 guests

cron