|
The console mode is a mode when the program doesn't open any
dialogs and doesn't need any interference from the user. A project
for the console mode must be prepared and tested beforehand. This
mode enables you to integrate the product with the Windows task
schedule system as well as to execute projects prepared beforehand
according to the schedule.
For example, in order to execute a project file today at 11.00,
use the following command line:
at 11:00 "dcmp.exe -c -s"
Return codes
The program returns a few error codes in console mode:
- 0 - error occurs, not enough parameters or nothing to
compare/synchronize
- 1 - tables has been compared successfully, differences
found
- 2 - tables are identical
How to use return codes? The user can use ERRORLEVEL environment
variable in batch file after the program execution.
ECHO.%ERRORLEVEL% line shows return code and IF ERRORLEVEL can be
used for execution branching.
Sample command file uses ERRORLEVEL code
@echo off
"c:\Program Files\dcmp.exe" -c -r "D:\Projects And Files\project1.dcmp"
IF ERRORLEVEL 2 GOTO SAME
IF ERRORLEVEL 1 GOTO DIFFERENT
echo "Error or nothing to compare"
goto end
:SAME
echo "The tables are identical"
goto end
:DIFFERENT
echo "The tables are different"
goto end
:end
|