✏️ Explanatory Question

TempDB tables

👁 64 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

TempDB tables

We call them TempDB tables because their TableType property value is TempDB. This value comes from the TableType::TempDB enum value. The TableType property value can be set at AOT > Data Dictionary > Tables > MyTempDBTable > Properties > TableType.
All types of temporary tables are automatically dropped by the system when the table variable in X++ goes out of scope. A TempDB table is NOT dropped when you set its record buffer variable to null.

Capabilities of TempDB Tables:

  1. Can be joined with other AX tables
  2. Can be either per company or global.
  3. Can have foreign key columns.
  4. TempDB tables can be instantiated from the client or server tier.
  5. Can have indexes columns.
  6. Can have methods, but cannot override them.
  7. Usable as a query
  8. No configuration key is required.

Limitations of TempDB Tables:

  1. Cannot be a valid time state table.
  2. Cannot have any delete actions.
  3. No Record Level Security (RLS).
  4. Cannot use the Table browser form.
  5. Cannot be in a table collection.
  6. No view support.

The lifetime of TempDB Tables:
A TempDB table is instantiated in the underlying database management system when the first SQL operation is sent to the database system from the AOS. (select, insert, update, or delete)

The situations that cause a TempDB table to be dropped are:

  1. Variable goes out of scope.
  2. A controlled restart of the AOS.
  3. A restart of the database system.
  4. Closure of the AX32.exe client.
  5. From Online Users form.