TMedTable.TableName TMedTable

property TableName: String ;

Description

Set TableName before opening (activating) the table.

TableName specifies the name of the table you wish to open or create.

TableName may contain drive and directory path.

For ttDBFNTX and ttDBFCDX (file-based tables):

·If TableName contains the path from the root - this full name is used.

·If DBFPath (or Directory) is set and TableName contains only the name of the table or name with relative path - TableName is appended to DBFPath value in order to find the full name.

For ttMEDNTX and ttMEDCDX (Mediator-based tables):

·If TableName does not contain path it is assumed the table is located on the current user account (the user to which connection has been established via MedConnection property).

·If TableName contains path - the directory before the file name is assumed to be the name of the user owning the table.

Example:

tab.TableName := 'headq.dbf';

table products owned by user headq

If MedConnection is established to another user - make sure the user specified in the path has sufficient database privileges to operate on the table.

This behavior can be changed by calling TMedConnection.hbcon.MedIgnPath(true). After this call, any path specified for Mediator tables will be completely ignored.

·For some databases (MS SQL, MySQL) it is possible to specify the database name in the path. It is specified as the last directory name before user name:

Example:

tab.TableName := 'proddb.dbf';

table products located in proddb database, owned by user headq

By default, database name is ignored by Mediator. You must call TMedConnection.hbcon.MedIgnDbN(false) to turn the database name recognition on.

Plase note that DBFPath property value is not used for Mediator tables.