User Tools

Site Tools


dbaseiii_driver_strings.htm
Navigation:  ISAM File Drivers > dBaseIII Database Driver >====== dBaseIII:Driver Strings ====== Previous pageReturn to chapter overviewNext page

There are switches or “driver strings” you can set to control the way your application creates, reads, and writes files with a specific driver. Driver strings are simply messages or parameters that are sent to the file driver at run-time to control its behavior. See Common Driver Features–Driver Strings for an overview of these runtime Database Driver switches and parameters.

NoteBox.jpg

Some driver strings have no effect after the file is open, so no SEND function syntax is listed for those strings. However, the SEND function syntax to return the value of the switch is listed for all driver strings.

The dBaseIII Driver supports the following Driver Strings:

BUFFERS

DRIVER('DBASE3', '/BUFFERS = n' )

[ Status“ = ] SEND(file, 'BUFFERS [ = n ]' )

Sets the size of the buffer used to read and write to the file, where the buffer size is (n * 512 bytes). Use the /BUFFERS driver string to increase the buffer size if access is slow. Maximum buffer size is 4,294,967,264. SEND returns the size of the buffer in bytes.

TipBox.jpg

The default is three buffers of 1024 bytes each. Increasing the number of buffers will not increase performance when a file is shared by multiple users.

RECOVER

DRIVER('DBASE3', '/RECOVER' )

[ Status” = ] SEND(file, 'RECOVER' )

Equivalent to the Xbase RECALL command, which recovers records marked for deletion. When using the dBaseIV driver, the DELETE statement flags a record as “inactive.” The driver does not remove the record until the PACK command is executed.

RECOVER is evaluated each time you open the file if you add the driver string to the data dictionary. When the driver recovers the records previously marked for deletion, you must manually rebuild keys and indexes with the BUILD statement.

IGNORESTATUS

DRIVER('DBASE3', '/IGNORESTATUS = on | off ' )

[ Status“ = ] SEND(file, 'IGNORESTATUS [ on | off ]' )

When set on, the driver does not skip deleted records when accessing the file with GET, NEXT, and PREVIOUS in file order. It also enables a PUT on a deleted or held record. IGNORESTATUS requires opening the file in exclusive mode. SEND returns the IGNORESTATUS setting (ON or OFF) in the form of a STRING(3).

DELETED

[ Status” = ] SEND(file, 'DELETED' )

For use only with the SEND command, when IGNORESTATUS is on. Returns the status of the current record. If deleted, the return string is “ON” and if not, “OFF.”

OMNIS

DRIVER('DBASE3', '/OMNIS' )

SEND(file, 'OMNIS' )

Specifies OMNIS file header and file delimiter compatibility. SEND is only valid when the file is closed; it returns nothing.

ZEROY2K

DRIVER('DBASE3', '/ZEROY2K = on | off' )

[ Status“ = ] SEND(file, 'ZEROY2K [ on | off ]' )

In the header of dBase3files there is a field that stores the year that the file was last edited. Some applications store this as the number of years since 1900. Others store it as a 2 digit year. So for dates in the year 2000 some applications store 0 in this field and others 100. Clarion will read files with either. However it will write 100. Writing 100 may make the files unreadable by products that only support 0. To change this behavior you can with use a driver string of ZEROY2K, a SEND command or a setting in the DRIVERS.INI file.

The driver will store 0 in the DBF file header when the WINI.INI setting is set to 1 or 'on' in a SEND command or driver string, otherwise a 100 will be stored in the DBF file header.

NoteBox.jpg

The SEND command causes the setting to be set for all files that use that driver, not just for that file.

Examples:

DRIVERS.INI:

;Sets all dBase3 files to store a 0 in the DBF file header

[CWDBASE3]

ZEROY2K=1

SEND command:

SEND('Orders', ZEROY2K='on'   !sets Orders file to store 0 in the DBF file header

SEND('Orders', ZEROY2K='off'  !sets Orders file to store 100 in the DBF file header

Driver String Orders:

FILE, DRIVER('dbase3', '/ZEROY2K=on'),PRE(ORD)  !SETS Orders file to store 030 '

dbaseiii_driver_strings.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1