C/SIDE Virtual Tables
A virtual table contains information provided by the system. In C/SIDE, you have access to a number of virtual tables. They work in much the same way as normal database tables, but you cannot change the information in them. That is, you can only read the information. Another difference is that virtual tables are not stored in the database (as normal tables are) but are computed by Microsoft Dynamics NAV at run time.
Uses of Virtual Tables
Virtual tables give you a consistent interface to a variety of different information. Because a virtual table can be treated just like an ordinary table, you can use the same methods to access information in virtual tables as you use when you are working with ordinary tables. For example, you can use filters to get subsets or ranges of integers or dates.
The virtual tables provide such information as:
Integers in the range –1,000,000,000 to 1,000,000,000.
Dates within a given period.
Overview of the operating system files.
Overview of the logical disk drives.
Trace of database requests from your client to the database.
Overview of the users that are currently connected to the database.
Overview of the operating system files that store the database.
Types of Virtual Tables
C/SIDE contains numerous virtual tables, including Date, Integer, File, and Drive. Virtual tables such as Date and Integer give you easy access to data for use in applications.
Other virtual tables include:
Windows Group Member
SID - Account ID
A system administrator most commonly uses these latter virtual tables. They give the system administrator information about the users that are currently connected to the database and the current state of the system.
Because virtual tables are not stored in the database, you cannot view them directly. To view a virtual table, you must create a tabular form based on it.
To view a virtual table
On the Tools menu, click Object Designer.
Click Form, and then click New to open the New Form window.
Select the Create a form using a wizard option and select Tabular-Type Form.
In the Table box, enter the name of the virtual table that you want to base the form on. Alternatively, you can use the lookup button to select the table from a list of all the tables in the database. The virtual tables use the highest number range (2000000001 – 2000000203). This example uses the Date table, which is table 2000000007.
Click OK and the Tabular-Type Form Wizard appears.
Click the >> button to move all items in the Available Fields box to the Field Order box.
Click Preview to view the table and its contents. Alternatively, click Finish and save the form.