HP Business BASIC/XL Reference Manual - HP 3000 MPE/iX Computer Systems - Edition 1 (32715-90001)

4- 36
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.
Redundant DBUNLOCK statements are ignored.
Examples
The following example shows the use of the DBUNLOCK statement.
100 DBUNLOCK Db$
110 DBUNLOCK Db$,STATUS=S(*)
120 DBUNLOCK Db$,STATUS S(*)
DBUPDATE
The DBUPDATE statement replaces the values of data items in the current
address of a specified dataset.
The database must be open in access mode one, two, three, or four (see
Table 4-2 in "DBOPEN Statement" for more on the meanings of these modes).
DBUPDATE...USING... Data will be packed into an internal
buffer from the list of local
variables specified in the PACKFMT
statement that can update the dataset.
DBUPDATE...FROM... The buffer specified in the FROM
clause is used to update the data set.
DBUPDATE...USING...FROM... Data will be packed into the buffer
specified in the FROM clause using the
PACKFMT can be used to update the data
set.
Syntax
{USING
line_id
}{,}
DBUPDATE
dbname
$ {FROM[=]
str_var
}{;} DATASET[=]
dataset
{USING
line_id
FROM[=]
str_var
}
[, ITEMS[=]
item_list
] [, 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.
str_var
The string variable containing the data item values to
be added to the database. The values must be in the
same order as their data item identifiers in the
items_list
parameter. The values must be packed into
str_var
from their corresponding HP Business BASIC/XL
variables using HP Business BASIC/XL's PACK statement.
line_id
A line number or label for a PACKFMT or IN DATASET
statement. The referenced statement is used to
automatically pack data from program variables.
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.
item_list
The name of an ordered set of data item identifiers,
either names or numbers. The value of each data item is