Product Home
DTM Data Comparer Online Documentation Prev Page Prev Page
General
Product profile
Connect
Quick Start
Direct Connection
Connect to Desktop File
Data Sources
DSN File
OLE DB Connection
Connection Profile
Connection Information
Troubleshooting Guide
Comparison
Synchronization
Table to Table Mode
Synchronous Navigation
Face-to-Face View
Database Mode
Key Definition
Column Mapping
Settings
General Settings
User Interface
Comparison Settings
Synchronization Settings
Report Settings
Project Properties
Script Viewer
Command Line
Console Mode
Process Cancellation
Comparison Report
Collate Window
Run SQL statement
SQL Console
Hot Keys
Information
Limitations
Support
License
Demo and Full versions
Install
How to buy
Upgrade
Uninstall
Products
Trademark Information
Glossary

Console Mode

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