Using table language drivers
dBASE Plus assigns a language driver to a table automatically when you create it. This assignment is recorded in the LDID, a 1-byte identifier in the file header region. When you create a table from scratch, dBASE Plus always assigns the current global language driver to the LDID. When you create a table file from another table file, either the global language driver or the language driver of the original table is assigned to the LDID of the new table. Which language driver is assigned depends on the command you use to create the file, as shown in the following table:.
Assigns global driver to the LDID of new table |
Assigns original table driver to LDID of new table |
CREATE |
COPY FILE |
CREATE...FROM |
COPY STRUCTURE |
CREATE...STRUCTURE EXTENDED |
COPY...STRUCTURE EXTENDED |
|
COPY TABLE |
For example, the following commands open a table file and create a new one with the LDID set to the current global language driver:
use CLIENTS // LDID specifies a language driver other than global language driver
copy to CLIENTS2 structure extended // LDID of CLIENTS2.DBF matches the language
// driver of CLIENTS.DBF
use CLIENTS2 exclusive
create NEWCLIENT from CLIENTS2 // Create a new table with the global LDID
The following commands open a table file and create a sorted table file with an LDID set to the original table language driver:
use CLIENTS // LDID specifies a nonglobal language driver
sort on LASTNAME to CUSTOMER // LDID of CUSTOMER the same driver as with CLIENTS