PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Re-Indexing fails when index is corrupted
Re-Indexing fails when index is corrupted
Débuté par Al, 05 oct. 2004 18:07 - 11 réponses
Posté le 05 octobre 2004 - 18:07
G'day All
I am wondering how to re-index a hyperfile when the index is corrupted. We have a site with a dodgy win98 workstation and the index files are being corrupted. The normal index command Hindex just returns an error and the only way to re-index the files is by using WDMap, which also shows a message that the index is corrupted but then goes ahead and does it anyway.
This is the code I am using
GComboDefault = 1
HourGlass()
ClearReportFiles("ALL") //deletes entries from a set of reporting files
LIndexRes is boolean = False
//the files to be indexed are in the FileToIndex combobox
//the operator can choose the indexing method but none work on a corrupted index
FOR GComboDefault = 1 TO ListCount(FILETOINDEX)
CurrFile = FILETOINDEX[GComboDefault]
//HCreationIfNotFound(FILETOINDEX[GComboDefault])
SWITCH SELECT1
CASE 2
LIndexRes = HIndex(FILETOINDEX[GComboDefault],hNdxCompact,WinInput())
CASE 3
LIndexRes = HIndex(FILETOINDEX[GComboDefault],hCheckMemo,WinInput())
OTHER CASE
LIndexRes = HIndex(FILETOINDEX[GComboDefault],hNdxNormal,WinInput())
END //switch
IF NOT LIndexRes THEN
LIndexRes = HIndex(FILETOINDEX[GComboDefault],hNdxMinimal)
IF NOT LIndexRes THEN
ErrorMsg("File "+FILETOINDEX[FILETOINDEX] +" could not be indexed"+HError(),Formname,4)
END //NOT LIndexRes (2)
END //NOT LIndexRes (1)
END //for listcount()
Close()

Is there another way of indexing hyper files that I am unaware of or should I be trapping the error in some way that allows the index to continue ?

Regards
Al
Posté le 05 octobre 2004 - 18:59
Hi,
this is the moment to use the wdoptimizer.exe and the commandline features.
Thilo

G'day All
I am wondering how to re-index a hyperfile when the index is corrupted. We have a site with a dodgy win98 workstation and the index files are being corrupted. The normal index command Hindex just returns an error and the only way to re-index the files is by using WDMap, which also shows a message that the index is corrupted but then goes ahead and does it anyway.
This is the code I am using
GComboDefault = 1
HourGlass()
ClearReportFiles("ALL") //deletes entries from a set of reporting files
LIndexRes is boolean = False
//the files to be indexed are in the FileToIndex combobox
//the operator can choose the indexing method but none work on a corrupted index
FOR GComboDefault = 1 TO ListCount(FILETOINDEX)
CurrFile = FILETOINDEX[GComboDefault]
//HCreationIfNotFound(FILETOINDEX[GComboDefault])
SWITCH SELECT1
CASE 2
LIndexRes = HIndex(FILETOINDEX[GComboDefault],hNdxCompact,WinInput())
CASE 3
LIndexRes = HIndex(FILETOINDEX[GComboDefault],hCheckMemo,WinInput())
OTHER CASE
LIndexRes = HIndex(FILETOINDEX[GComboDefault],hNdxNormal,WinInput())
END //switch
IF NOT LIndexRes THEN
LIndexRes = HIndex(FILETOINDEX[GComboDefault],hNdxMinimal)
IF NOT LIndexRes THEN
ErrorMsg("File "+FILETOINDEX[FILETOINDEX] +" could not be indexed"+HError(),Formname,4)
END //NOT LIndexRes (2)
END //NOT LIndexRes (1)
END //for listcount()
Close()

Is there another way of indexing hyper files that I am unaware of or should I be trapping the error in some way that allows the index to continue ?

Regards
Al
Posté le 05 octobre 2004 - 19:23
G'day Thilo
Thanks for the info, I wasn't aware of the Optimizers ability in that regard.
Regards
Al
Posté le 05 octobre 2004 - 22:08
Hello,
In the helpfile there is nothing about parameters for WDoptimizer starting from the commandline.
Has anyone any idea where to find them.
Regards Frans
Posté le 05 octobre 2004 - 23:03
Hi ,
i use the following code:
------------------------------------------------------
s is string
s = "WDOptimizer.exe /Fic=" + fCurrentDir()+datadir + "\ /option=4 "
ExeRun(s , exeActive, exeWait,fCurrentDir())
------------------------------------------------------
- datadir is the directory where the Data file are
- option seems to be similar to the options in the wdoptimizer GUI.
Test it!
Greetings
Thilo

Hello,
In the helpfile there is nothing about parameters for WDoptimizer starting from the commandline.
Has anyone any idea where to find them.
Regards Frans
Posté le 06 octobre 2004 - 00:27
Hello Thilo,
Thank you for your fast answer.
Where did you find the parameters?
Regards frans
Posté le 06 octobre 2004 - 01:04
G'day Frans
There is a small problem in delivering that info as it is an area where PCSoft are a little behind with the English version
There is no mention of the parameters in the main WD8 help. There are 2 chm files in the help directory of Windev8, one in French and one in English. The French help file is much bigger than the Emglish one and has much more detail including the parameters - in French. I suspect that the English file is simply the client one not the developers. When you include WDOptimizer in your install package, it includes the French copy of the help not the English one.
I have written to PCSoft Tech support to let them know and asked for an Eglish version of the help file or a translation of the parameters.
The program however works perfectly and indexes every file it can find and quite quickly. I haven't tried it programatically yet with exerun() but running it manually from a DOS window as a service with no parameters it works fine - just shows a small window with a file message and gauge bar.
Regards
Al
Posté le 06 octobre 2004 - 01:27
>G'day All,
Thanks again
Posté le 08 octobre 2004 - 22:02
G'day Frans
There is a small problem in delivering that info as it is an area where PCSoft are a little behind with the English version
There is no mention of the parameters in the main WD8 help. There are 2 chm files in the help directory of Windev8, one in French and one in English. The French help file is much bigger than the Emglish one and has much more detail including the parameters - in French. I suspect that the English file is simply the client one not the developers. When you include WDOptimizer in your install package, it includes the French copy of the help not the English one.
I have written to PCSoft Tech support to let them know and asked for an Eglish version of the help file or a translation of the parameters.
The program however works perfectly and indexes every file it can find and quite quickly. I haven't tried it programatically yet with exerun() but running it manually from a DOS window as a service with no parameters it works fine - just shows a small window with a file message and gauge bar.
Regards
Al
Posté le 08 octobre 2004 - 22:07
G'day Frans and Thilo
I have received the updated English WDOptimizer.chm file from PCSoft Tech support.
These are the command line parameters. I can email the file if you would like it or you could contact PCSoft Tech support directly.
WDOptimizer /Fic =
/mdp =
/option =
/Sauve =
Parameter details:
Parameter
Meaning
/Fic=
To process a single file: full path of file to process.
To process a set of files: directory path.
/mdp=
Password associated with the file to process (single file).

/option=
Number corresponding to the selected option:
1. Check the index.
2.Calculate the file statistics (used to optimize indexes).
3. Reindex.
4. Review the entire file (including indexes and memos).

/Sauve=
Used to save the files to process (taken into account only if /option = 4).

Example
The command line below is used to reindex files located in "C:\MyAppli\Data".
ExeRun("C:\MyDirectory\WDOptimizer.EXE /Fic=C:\MyAppli\Data")
Regards
Al
Posté le 08 octobre 2004 - 23:31
Hello All,
If you would mail them to me? That would be nice.
Thanks in advance.
tse@tip.nl
Regards Frans
G'day Frans and Thilo
I have received the updated English WDOptimizer.chm file from PCSoft Tech support.
These are the command line parameters. I can email the file if you would like it or you could contact PCSoft Tech support directly.
WDOptimizer /Fic =
/mdp =
/option =
/Sauve =
Parameter details:
Parameter
Meaning
/Fic=
To process a single file: full path of file to process.
To process a set of files: directory path.
/mdp=
Password associated with the file to process (single file).

/option=
Number corresponding to the selected option:
1. Check the index.
2.Calculate the file statistics (used to optimize indexes).
3. Reindex.
4. Review the entire file (including indexes and memos).

/Sauve=
Used to save the files to process (taken into account only if /option = 4).

Example
The command line below is used to reindex files located in "C:\MyAppli\Data".
ExeRun("C:\MyDirectory\WDOptimizer.EXE /Fic=C:\MyAppli\Data")
Regards
Al
Posté le 09 octobre 2004 - 01:21
Hello All,
If you would mail them to me? That would be nice.
Thanks in advance.
tse@tip.nl
Regards Frans
G'day Frans and Thilo
I have received the updated English WDOptimizer.chm file from PCSoft Tech support.
These are the command line parameters. I can email the file if you would like it or you could contact PCSoft Tech support directly.
WDOptimizer /Fic =
/mdp =
/option =
/Sauve =
Parameter details:
Parameter
Meaning
/Fic=
To process a single file: full path of file to process.
To process a set of files: directory path.
/mdp=
Password associated with the file to process (single file).

/option=
Number corresponding to the selected option:
1. Check the index.
2.Calculate the file statistics (used to optimize indexes).
3. Reindex.
4. Review the entire file (including indexes and memos).

/Sauve=
Used to save the files to process (taken into account only if /option = 4).

Example
The command line below is used to reindex files located in "C:\MyAppli\Data".
ExeRun("C:\MyDirectory\WDOptimizer.EXE /Fic=C:\MyAppli\Data")
Regards
Al