About Expressions and Data Providers

Most expression functions behave the same way across all data providers, but there are a few exceptions.

Unsupported Functions

You can use any function when creating a filter or a calculated property. These results are not saved back to the data store. However, in AutoCAD Map 3D toolset, if you use a function that returns an unsupported data type to insert a value into the Data Table, an exception results. That operation is not valid for the data provider. For example, SHP files do not support the FdoInt16 or FdoDouble data types. If you try to save a value of that data type back to a SHP data store, an error occurs.

ODBC Providers

In AutoCAD Map 3D toolset, you can apply an expression before you actually connect to the data store. For example, you can use a query to add features to a map. This situation can be an issue for ODBC providers, which can connect to multiple data sources. Not all ODBC sources support expression functions. For this reason, the functions are evaluated as part of the expression-building process in all cases, even if the connected data source can do so.

Soundex

The Soundex function is natively supported by all relational database management systems (RDBMS). The underlying RDBMS evaluates any expression including this function. However, the result returned by a MySQL provider may differ from the result you receive from other providers.

Boolean Value Representation

SDF and SHP providers represent a Boolean value with the terms TRUE and FALSE. RDBMS providers represent a Boolean value with 0 and 1. This difference can affect the display of labels. For example, the following expression defines a label that indicates whether a valve is open:

Concat('Valve is open: ', <valve_status_property>)

For SDF and SHP data, the label will read ”Valve is open: True.” For RDBMS data, the label will read, “Valve is open: 1.”

AddMonths and MonthsBetween

The AddMonths and MonthsBetween functions do not take day information into account, but RDBMS systems do.

For example, for the expression AddMonths(<date_property>, 88.7), an RDBMS provider might add 88.7 months to the provided date. The function in expressions you create in the product adds 88 months only.

Similarly, for the expression MonthsBetween(<date_1>, <date_2>), an RDBMS provider might return a value of 77.4. The function in expressions you create in the product returns 77.

Cache-based Operation Versus RDBMS-based Operation

Some operations (for example, the creation of a calculated property) are cache-based operations and use the expression-building process for evaluation. Other operations (for example, a filter on an RDBMS data store) use the underlying RDBMS system.

Due to differences between providers, the results can differ. For example, if you connect to a MySQL data store, you can create two calculated properties: CP1 and CP2. CP1 is defined by the expression Soundex(<property>) and CP2 is defined by the expression Soundex(<literal>). In the Data Table, the value for CP1 and CP2 may be identical. However, if you use a filter containing the expression Soundex(<property>) = Soundex(<literal>), the resulting values may be different. in AutoCAD Map 3D toolset, in the Data Table, the expression-building process evaluates the expressions. The MySQL data store (which uses a different function definition) evaluates the filter.