User Tools

Site Tools


topspeed_driver_strings.htm
Navigation:  ISAM File Drivers > TopSpeed Database Driver >====== TopSpeed: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 TopSpeed Driver supports the following Driver Strings:

DECIMALCheck

[ DECCheck“ = ] SEND(file, 'DECIMALCheck [ = ON|OFF ]' )

DECIMALCheck=OFF ensures compatibility of TopSpeed files originally created in certain early versions of Clarion with the current version by disabling error reporting for the number of decimal places in DECIMAL fields during file header comparisons.

This switch should be used as a driver string, or, in a SEND command before the file is opened.

FLAGS

[ Flags” = ] SEND(file, 'FLAGS [ = bitmap ]' )

Sets and returns the configuration flags for the file. Use the following EQUATEs declared in EQUATES.CLW to control the behavior of the target TopSpeed file:

!TopSpeed File Flags

TPSREADONLY    EQUATE(1)

For example, the following code makes the file read-only for ODBC access while preserving any other flags:

TpsFlags = SEND(MyFile, 'FLAGS')

SEND(MyFile, 'FLAGS ='&BOR(TpsFlags,TPSREADONLY)

FULLBUILD

[ State“ = ] SEND(file, 'FULLBUILD [ = on | off ]' )

[ State” = ] file{PROP:FULLBUILD} [ = on | off ]' )

The TopSpeed driver has an optimized appending mechanism where you can add large numbers of records to an existing table with the APPEND statement. Issuing a subsequent BUILD updates only the appended key information, making incremental batch updates very fast. This is the default behavior. Use the FULLBUILD driver string to modify this default behavior.

FULLBUILD=ON tells the next BUILD statement to fully rebuild the keys. FULLBUILD=OFF restores the BUILD to its optimized state. Both versions of the SEND command return the current build state as a string 'ON' or 'OFF'. Issue SEND(file,'FULLBUILD') to return the current build state without changing it.

PNM=

TName“ = SEND(file, 'PNM=[starting point]' )

Returns the next table name in the file's TopSpeed super file, after the specified starting point. If there are no table names after the specified starting point, SEND returns an empty string. If starting point is omitted or contains an empty string, SEND returns the first table name in the file. PNM= is only valid with the SEND command. There are no spaces surrounding the equal sign (=). The target file is the label of any of the tables within the TopSpeed super file.

For example, given a TopSpeed file containing the Supp table, the following code displays an alphabetical listing of all the tables in the file:

CODE

name = ''

LOOP

name = SEND(Supp,'PNM=' & name)

If name

 MESSAGE(name)

ELSE

 BREAK

END

END

TCF

DRIVER('TOPSPEED', '/TCF = filename' )

[TCFPath =] SEND(file, 'TCF [ = filename ]' )

Specifies a transaction control file other than the default TOPSPEED.TCF. The file identifies all transactions in progress until the program terminates or a SEND(file, 'TCF = filename') executes. In other words, the TCF setting affects all TopSpeed files accessed by the program. This returns the name of the transaction control file. For example, TCFPath = SEND(file, 'TCF').

NoteBox.jpg

We recommend using one transaction control file for a system. Using multiple files with different access rights can result in partially committed transactions– some of the files within a transaction might be updated and others left unchanged.

See Also: Transaction Control Files

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