The purpose of the ValidateDatabase.exe tool is to check one or more database tables for any tags that have not been defined in the data dictionary (your .inf database structure files) and report on them. The tool works on SQL databases only.

In Adlib it was always possible to store data in field tags which hadn’t been defined in the data dictionary. You could do that by associating an undefined tag with a screen field, by assigning a value to an undefined tag by means of an adapl or via an import mapping to one or more undefined tags. However, the current WebAPI and Axiell Collections implement a strict policy concerning the definition of field tags: all tags used in records that you read or write using this software, must have been defined in the data dictionary. So when you’re about to start using the WebAPI or Collections, you may encounter errors because of undefined tags. The ValidateDatabase tool can help you identify the tags causing the problems, after which you can still define them in the relevant .inf and solve the issue.

To be precise: the tool produces a list of valid (already defined) and invalid tags for which no definition has been found. It also counts the number of appearances of both the defined and undefined tags in the records. Further, it has a fix option which automatically creates provisional, generic field definitions for all unknown tags, using some default settings. Although using the fix option is a quick fix, you may also, afterwards, consider checking the relevant records for redundant data and clean them up, and edit the settings of the automatically created fields to actually reflect the data you store in those fields.

The ValidateDatabase.exe tool must be called from the operating system command line – type cmd in the Windows Explorer address field and press Enter to open a command line window - with the following syntax:

ValidateDatabase <data folder> [database name | *] [check|fix]

Everything between [ and ] is optional. | means: enter only one of both arguments. Leave out all brackets.

Either specify a single database table name (the name of an .inf file with or without the .inf extension) or use * to check all databases in the \data folder. Use check to just report a list of defined and undefined tags or use fix to automatically create field definitions for all undefined tags.

For example, to check just the collect database table if you placed the \ValidateDatabase folder containing the tool files as a subfolder in your Axiell \data folder and call the executable from its own folder:

ValidateDatabase ..\ collect check

Example of a partial result:

C:\Axiell Software\Model application 4.2 NL SQL\data\ValidateDatabase>validatedatabase ..\ collect check

Started: collect
Unknown tags:
LS,CO,%B,X8,CN,CH,BS,BH,CD,BP,BI,x1,x2,CR
Tag count in record (invalid tags)
LS: 15
CO: 7
%B: 15
x1: 15
x2: 6
CR: 1
Tag count in record (valid tags)
vm: 670
vi: 105
tx: 685
PB: 5
Lq: 4
Completed: collect

To write the entire list to a text file in the current folder, use a syntax like:

ValidateDatabase ..\ collect check > myundefined-tags.txt

To automatically create field definitions for all undefined tags in collect.inf, you would use:

ValidateDatabase ..\ collect fix > myundefinedtags.txt

This will create field names with the syntax:

provisional_field_for_<tag>

For example:

provisional_field_for_LS

These fields will be normal text fields of undefined length, having only an English field name. It is recommended to rename these fields and set their other properties according to their purpose, using Axiell Designer.