English (English) - Change language

Specifying databases and text files in the FlexiLayout language

The program interface and the FlexiLayout language allow you to refer to databases and text files to specify, for example, strings to be found on an image.

The ADO (Microsoft ActiveX Data Objects) interface is used to refer to databases. A database and its properties are set by the standard connection string, i.e. a set of arguments separated by semicolons which specify the connection parameters. These parameters include Provider, Data Source and others.

An SQL query starting with the SELECT command is used to search for fields in the database table. The resulting set obtained by a query must contain only one field. If a query returns more than one database field, the data from the first field are used. In its simplest form, a query gets the required field from a specified database table.

A text file is accessed by file name, which is specified relative to the folder that contains the FlexiCapture Studio project. Each search string must start on a new line. Empty lines are ignored.

When you export a FlexiLayout in order to add it to a document definition in ABBYY FlexiCapture, the text files are copied to the folder Res, where FileName is the name of the FlexiLayout file or classifier file. This folder is placed in the same folder that contains the exported file. When you subsequently import a FlexiLayout, ABBYY FlexiCapture will place the text files into appropriate folders automatically. For more about the locations of text files, see the ABBYY FlexiCapture Help system.

Text files may be in ANSI or Unicode encoding. A Unicode file must start with the standard header consisting of the special Unicode character 0xFEFF. To convert an ANSI file to Unicode, the current system code page will be used.

When matching a FlexiLayout with a page, the results of queries to the database may be stored within the program. Any changes to the database or the text file will be taken into account only when the program has switched to the next page. If an error occurs related to the database or the text file, FlexiLayout matching will be interrupted and the FlexiLayout will be considered as not matched.

Note.To speed up FlexiLayout matching, the first 1,000 strings in the file are used by default. To use more strings, specify the required number in the SearchTextFromFile command (Advanced pre-search relationsAdvanced).

15.09.2020 9:42:43


Please leave your feedback about this article