Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
Delimiting names of databases, schemata, tables, columns, indexes and constraints
Programmer's Guide > OpenAccess ORM Classic (Old API) > OpenAccess Application Scenarios > Using Multiple Schemata with OpenAccess ORM > Delimiting names of databases, schemata, tables, columns, indexes and constraints

Glossary Item Box

This documentation article is a legacy resource describing the functionality of the deprecated OpenAccess Classic only. The contemporary documentation of Telerik OpenAccess ORM is available here.

OpenAccess ORM allows to use names containing spaces and dots for databases, schemata, tables, columns, indexes and constraints. When such a name is to be used, the name must be enclosed in single quotes. Single quotes serve as a general marker and are translated into the delimitation character as defined by the backend (e.g. brackets for MSSQL, back-quotes for MySQL, quotes for all others).

Spaces or dots in names

Assume you have a class OrderDetails which should be stored into a table "Order Details".

Copy Code
<class name="OrderDetails">
    <extension key="db-table-name" value="'Order Details'" />
</class>

When using a database or schema name in the table name, all parts must be enlosed in single quotes when a single part needs enclosing:

Copy Code
<class name="OrderDetails">
    <!-- You should really use a logical database name not containing spaces. -->
    <extension key="db-table-name" value="'My Company Database'.'Sales'.'Order Details'" />
</class>

It is currently not possible to use a single quote within a name; single quotes are always treated as delimiter.