Applies To:
  • CitectSCADA 5.50, 5.50 Service Pack A, 5.50 Service Pack B, 5.50 Service Pack C, 6.xx

Summary:
I get an "unknown dba error" in the "Variable.dbf" file when compiling my project.
 

Solution:
The error may originate from the use of the “IFDEF” macro in a genie or a supergenie. When the genie is pasted on a graphics page, the TagName field should not be left blank.

The “IFDEF” macro tests the tag defined in the first argument, and returns either the 2nd or 3rd argument. The field for the first argument must NOT be left blank. The function requires either a non-existing or an existing tag; a blank will return an error. The “IFDEF” macro does not treat blank as a non-existing tag.

There are two ways to work around this situation:

1. You may enter the name of a non-existing tag when pasting the genie or supergenie on your main graphic page.
In such case, the IFDEF macro will return the value of its third argument.

2. You may also prefer to reserve a name of a tag that doesn't and will never exist, and use this as a default value for that Genie/Supergenie substitution.

When you call the function in your genie, here is what may be done:

Instead of calling the function as shown below:
IFDEF (<"%Tag name%">, <Hidden When value if tag defined>, <Hidden When value if tag undefined>)

You may call it this way:
IFDEF (<"%Tag name=DefaultTagName%">, <Hidden When value if tag defined>, <Hidden When value if tag undefined>)

The “=DefaultTagName” that is added will substitute a default value for the first argument. The first argument never being left blank, the “IFDEF” function will no longer return an error.

If you now paste your genie/supergenie on a page, the fields for the tag used in the “IFDEF” function will automatically be set to the default value:

Then, please perform a “Pack libraries” and “Updates Pages” from the Tools menu in your Graphics editor.

NOTE: Please disable “Fast Update Pages” from the tools/options sub-menu in Graphic Builder, as well as disable “Incremental compile” from Tools/options in the Project Editor.

 

Keywords:
IFDEF, genie, supergenie, unknown dba error, VARIABLE.DBF  

Attachments