Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 4 Jahren, 8 Monaten
Letzter Beitrag:
vor 4 Jahren, 8 Monaten
Beteiligte Autoren:
David Egan, Steve Muller, GuenterP

[WD17] HFCS, Analysis Change & Transaction Files

Startbeitrag von David Egan am 13.11.2013 18:51

Hi
I recently made some changes to my analysis. When my app starts it checks this and automatically updates files etc. So far so good except that every now and then I would get an error that the files were out of sync. It wasn't consistent though; in one window an update to a file would work fine but not in another. Deleting the file & re-creating it solved the problem on my dev machine but obviously not a good option for users with real data!

It turns out that where I am updating a file within a transaction frame, an existing TRX file is not updated/deleted automatically. The details of the old analysis are retained within this file & this is causing the problem. Deleting the TRX file solves the problem, next transactional update recreates it from the current analysis & everything is right again.

Thought I'd share this in case others face a similar situation.

Cheers

David

Antworten:

Re: [WD17] HFCS, Analysis Change & Transaction Files

Hi David,
thank you for sharing this one! Erasing the transaction files therefore should be added to any restructuring routine! And it's a good reason to NOT let an automatic routine detect structure differences and do the restructure run. Do it on your own as a part of opening the files. I just have to add that some errors looking very similar to end users can be part of the .REP-file business. Imho, switching OFF the REP-file management for end user programs is a good advice to keep clear of such unexplainable problems.

von GuenterP - am 14.11.2013 06:24

Re: [WD17] HFCS, Analysis Change & Transaction Files

Hi Guenter
Couldn't agree more.
I'm just trying to automate the deletion now but am having problems getting the folder name for the database. I've tried using ls_path = HSetServer(Connection,hdatabasepath) but this just returns %%EXE%%\BDD.
According to the help I should be able to use this directly but testing using FListDir(ls_path) returns nothing. Any ideas how I get the actual folder name represented by %%EXE%%?

Cheers

David

von David Egan - am 14.11.2013 20:05

Re: [WD17] HFCS, Analysis Change & Transaction Files

Hi Geunter,

What does your code look like that detects a file structure change on file open and automatically restructures it?

Thanks
Steve

von Steve Muller - am 14.11.2013 20:33
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.