DRIVER (specify data file type)

Top  Previous  Next

 

DRIVER(filetype [,driver string])

DRIVER

Specifies the file system the file uses.

filetype

A string constant containing the name of the file manager (Btrieve, Clarion, etc.).

driver string

A string constant or variable containing any additional instructions to the file driver. All the valid values for this parameter are listed in each file driver's documentation.

The DRIVER attribute (PROP:DRIVER) specifies which file driver is used to access the data file. DRIVER is a required attribute of all FILE declarations.

Clarion programs use file drivers for physical file access. A file driver acts as a translator between a Clarion program and the file system, eliminating different access commands for each file system. File drivers allow access to files from different file systems without changes in the Clarion syntax.

The specific implementation method of each Clarion file access command is dependent on the file driver. Some commands may not be available in a file driver due to limitations in the file system. Each file driver is documented in the Database Drivers topic. Any unsupported file access commands, FILE declaration attributes, data types, and/or file system idiosyncrasies are listed there.

If the file is declared without the THREAD attribute, the driver string variable (PROP:DriverString) used with the DRIVER attribute should also be declared without the THREAD attribute.

Example:

Names  FILE,PRE(NAM),DRIVER('Clarion')    !Begin file declaration

Record  RECORD

Name     STRING(20)

       END

      END

 

!Use commas to separate multiple driver strings:

A FILE,PRE(ASC),DRIVER('BASIC','/ALWAYSQUOTE=OFF,/COMMA=9,/ENDOFRECORD=1,13')

Record  RECORD

Name     STRING(20)

       END

      END

 

See Also:

Database Drivers