Optional: Modification Step ODBC Classes

 

The maintenance of the material numbers and prices can now be done in TCE.

However, most of this data is already stored in a database. Therefore, it makes sense to use this external data in TCE.

To access a database in TCE, you must create a connection in the knowledge base properties.

For a connection, you must specify an ID and the connection to the database via ODBC parameters.

Example

 

In this case, a small database with the name Tutorial has been created for this tutorial under MS SQL Server.

 

It would be ideal to read the ID column and multilingual names and price into the class structure of TCE. Let's start with this:

First, we create a class below the Material class called Material ODBC.

In this class, we can use the context menu to create a new ODBC selection.

 

The indication of the term Classification entered in strokes facilitates the restriction under the data of the data table, as can be seen below.

Now let's create another class called Material BULB under the Material ODBC class.

In this class, ODBC parameters are now created under the (inherited) ODBC selection.

This is where the term Classification entered in pipes comes into use. By specifying the term BULB, only those table rows of the database table are used which contain the term BULB in the Classification column.

Turn on class selection and all IDs found using the Selection/Parameters combination are created as classes.

If a text is entered under Prefix, all classes in the class name are preceded by this text.

Now change the feature Price, which should no longer be provided with content via the constant [List price], but via the database access.

For this purpose, the feature Price in the class Material ODBC must be overridden and the switch initialize with database value must be switched on. Then, under Database column, you can specify the database table column name of the data table. Of course, the database column name must be part of the SQL statement of the ODBC selection.