DBCLOSE [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Reference Manual
DBCLOSE
The DBCLOSE statement terminates database access, makes a data set
temporarily or permanently inaccessible, or rewinds a data set.
Syntax
DBCLOSE dbname$[,MODE[=]dbclose_mode]
[,DATASET[=]dataset]
[,STATUS[=]status_array(*)]
Parameters
dbname$ A string variable, whose value is a TurboIMAGE database
name. dbname$ must be the variable that was passed to a
successful DBOPEN.
dbclose_mode A numeric expression that evaluates to one of the
following TurboImage database modes:
Mode Effect
1 Terminate access to entire database and
ignore the dataset parameter.
(Default)
2 Terminate access to dataset, but leave
database open.
3 Rewind the data set.
dataset A string expression with a maximum length of 16
characters. Its value is the name of a data set. The
name must be left-justified and if shorter than 16
characters must be terminated by a semicolon or blank.
This parameter can also be an integer or short integer
corresponding to the desired dataset number.
status_array A 10-element short integer array to which TurboIMAGE
returns an error code. If an HP Business BASIC/XL
database statement specifies the STATUS option, an error
does not abort the program. Following execution of the
database statement the program can check status_array
and handle the error. The values returned by TurboIMAGE
to this array are detailed in the description of the
status parameter of the equivalent TurboIMAGE library
procedure.
Examples
100 DBCLOSE Data_base$,STATUS status(*)
110 DBCLOSE Data_base$,MODE=1,STATUS=Status(*)
120 DBCLOSE Data_base$,MODE=2,DATASET Dataset$,STATUS status(*)
MPE/iX 5.0 Documentation