Driver Strings

Top  Previous  Next

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. The various driver specific driver strings are described in the Driver Strings section for each driver.

Driver strings are sent in three ways: with the OPEN or CREATE statement, with the SEND procedure, and with property syntax.

DRIVER('Driver', '/DriverString = value')

The OPEN(file) and CREATE(file) statements send any driver strings specified in the FILE's DRIVER attribute. OPEN sends the string immediately before the file is opened. You may specify these driver strings with a hand coded FILE declaration (see DRIVER in the Language Reference for more information) or in the Data Dictionary (Driver Options field in the File Properties dialog--see File Properties ). In either case, you must prepend a forward slash (/) to the driver string. For example:

MyFile FILE,DRIVER('TopSpeed','/LOGFILE=MyFile.Log')


OPEN(MyFile)         !sends the LOGFILE driver string


SEND(file, 'DriverString')

The SEND function sends a driver string to the file driver at any time, including before the file is opened. SEND functions take two forms--with an equal sign to change the value of the switch, and without an equal sign to return the value of the switch. With SEND, the ISAM drivers do not require the preceeding forward slash, but the SQL drivers do require it. For example:

SEND(MyFile,'LOGFILE='&MyLogFile)             !Set the logfile

MyLogFile=SEND(MySQLFile,'/LOGFILE')          !Query the logfile

OldLogFile=SEND(MyFile,'LOGFILE='&NewLogFile) !Set & Query the logfile



Property syntax is an alternative to the SEND function. With property syntax you can send a driver string to the file driver any time after the file is opened. With property syntax, the driver string does not require the preceeding forward slash. For example:

MyLogFile = 'MyFile.Log'

MyFile{PROP:Profile}=MyLogFile   !Set the logfile

MyLogFile = MyFile{PROP:Profile} !Query the logfile


See Also:


ASCII Driver Strings

Basic:Driver Strings

Btrieve:Driver Strings

Clarion:Driver Strings

Clipper:Driver Strings

dBaseIII:Driver Strings

dBaseIV:Driver Strings

DOS:Driver Strings

FoxPro:Driver Strings

TopSpeed: Driver Strings


SQL Driver Strings

MSSQL Accelerator Driver Strings

ODBC:Driver Strings

Oracle Accelerator Driver Strings

SQLAnywhere Accelerator Driver Strings