AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Herramientas / WDOptimizer
  • Syntax
  • The following syntax enables you to start WDOptimizer in command line
  • Examples
  • Example of reindex procedure
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Syntax

The following syntax enables you to start WDOptimizer in command line

WDOptimizer /Fic=<Directory>
/Pwd=<Password>
/Option=<Type of action performed>
/Log=<Log file>
/Mute=<Yes/No>
/ExploreSubDir=<Yes/No>
/CompressIndex=<Yes/No>
/DelIndex=<Yes/No>
/GetMemos=<Yes/No>
/KeepCrossedRec=<Yes/No>
/Charset=<Character set>
/Density=<Density rate>
/Language=<Display language>
/Bck=<Yes/No>
The table below presents the different elements that can be found on the command line:
ParameterMeaning
/Fic=<Directory>To process a single data file: full path of the data file to be processed.
To process a set of data files:
  • path of a directory,
  • INI file in export format generated by WDOptimizer.
To process transactions: full path of the transaction file.
Example c:ASLASH_Temp\file.fic
/Pwd=<Password>Password associated with the data file to process (single data file)
/Option=<Type of action to perform>Number corresponding to the option of WDOptimizer to start:
1: Index check.
2: Optimize index speed (Recalculate data file statistics).
3: Rebuild indexes.
4: Rebuild indexes and memos.
5: Revise and compress indexes and memos.
/Log=<Log file>Full path of the log file (.log) to create. This file is created only if an option from 1 to 5 is selected.
/Mute=<Yes/No>Yes to automatically validate the report window (No by default).
/ExploreSubDir=<Yes/No>"Yes" to explore subdirectories of the directory specified in the "/Fic" parameter ("No" by default).
/CompressIndex=<Yes/No>Yes to delete inactive records when reindexing (options 3 and 4) (No by default).
/DelIndex=<Yes/No>Yes to delete the damaged records (options 3 and 4) (No by default).
/GetMemos=<Yes/No>Yes to try to retrieve the data from the memo if it is damaged (option 5) (No by default).
/KeepCrossedRec=<Yes/No>Yes to keep the crossed records (option 5) (No by default).
/Charset=<Charset>Used to specify the character set used for the reindex operation. You have the ability to use one of the constants corresponding to the character set to use.
charsetArabicArabic characters
charsetBalticBaltic characters
charsetChineseChinese characters (People's Republic of China)
charsetDefaultUses the computer's default character set. No character set is forced.
charsetEastEuropeEastern European characters (Polish, etc.)
charsetGreekGreek characters
charsetHebrewHebrew characters
charsetJapaneseJapanese characters
charsetKoreanKorean characters
charsetOccidentalRoman characters in ANSI standard
charsetRussianRussian characters
charsetThaiThai characters
charsetTraditionalChineseTraditional Chinese characters (Republic of Taiwan)
charsetTurkishTurkish characters
charsetUTF8Used to manage the countries with two character sets (Hong Kong) and the countries with no character set defined in Windows (Georgian and Armenian).
charsetVietnameseVietnamese characters
/Density=<Density rate>Density rate of indexes. This rate is set to 80 by default.
The higher this rate is, the denser and smaller the index is. In this case, iterations, searches, filters and queries will be faster. The additions of records and the modifications of records may be slower.
The lower this rate is, the less dense and the bigger the index will be. In this case, iterations, searches, filters and queries will be slower. The additions of records and the modifications of records will be faster.
/Language=<Display language>"US" to start WDOptimizer in English (French by default).
/Bck=<No>By default, the data files to be processed are saved (only taken into account if /option = 5). No if you don't want to perform this backup.
Examples
The following command line reindexes the data files in the "C:\MyAppli\Data" directory.
ExeRun("C:\MyDirectory\WDOptimizer.EXE /Fic=C:\MyApp\Data")
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)

Example of reindex procedure

// Global variables of the project 
gsAppName is string = "MyApp"
gsDataDir is string = CompleteDir(fExeDir()) + "Data\"
//Procedure global to the project 
PROCEDURE gWdOptimizeAnalysis(_OptionNum = 5,_bSave = False)
// WDOPTIMIZER control for all data files in an application 
// while taking into account the password, exeActive and 
// WDOptimizer is blocking when run. 
// After each reindex operation, WDOptimizer displays the message
// "Re-indexing the data file 'C:\.....\MonFic.Fic' was successful".
// The user must click "OK".
// The option 5 of WDOptimizer is used by default
// By default, data files are not saved before optimization
// - Required: 
//   - The data files can be relocated in relation to the exe 
// (Global variables gsAppName and gsDataDir)
//  - WDOptimizer is always found beside the executable
// - Data files can have a physical name different from their logical name 
// as well as an extension <> ".FIC"
 
// Variables local to the process
sFileList, sFileName are strings
sSave is string = "False"
IF _bSave = True THEN sSave = "True"
	i is int = 1
	sDir is string = CompleteDir(fExeDir())
	 // Physical name of the file (name + extension)
	sPhysicalFileName is string
	// Password of the file 
	sPwd is string 
	sCommandLine is string

	// Check for WDOptimizer
	IF fDir(sDir + "WDOptimizer.EXE", frFile) = "" _OR_ ...
				fDir(sDir + "WDTool.WDK", frFile) = "" THEN 
			Error("WDOptimizer has not been correctly installed")
		RETURN
	END

	// List the data files found in the analysis
	sFileList = HListFile()
	sFileName = ExtractString(sFileList, i, CR)
	WHILE sFileName <> EOT 
		sPhysicalFileName = {sFileName}..PhysicalName + {sFileName}..Extension
		IF fDir(gsDataDir + sPhysicalFileName, frFile) <> "" THEN 
			// Password protection for certain protected data files  
		SWITCH Upper(sFileName)
			CASE "TOTO": sPwd = "toto"
			OTHER CASE: sPwd = ""  
		END
		IF sPwd <> "" THEN 
			sCommandLine = 
				sDir + "WDOptimizer.EXE   /File=" + ...
				gsDataDir + sPhysicalFileName + " /Pwd=" + sPwd + " /" + ...
					_OptionNum + " /" + sBackup
		ELSE
				sCommandLine = sDir + "WDOptimizer.EXE   /File=" + ...
					 gsDataDir + sPhysicalFileName + " /5 /" + sBackup
			END
		ExeRun(sCommandLine, exeActive, exeWait)
	END
	i++
	sFileName = ExtractString(sFileList, i, CR)
END
Info("Optimization of data files from '" + gsNomAppli + "' completed")
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 07/06/2025

Señalar un error o enviar una sugerencia | Ayuda local