Database Commands SECTION 6 Functions and Methods
104
Closes a Connection or Recordset. Closing a Connection will automatically
close all recordsets associated with it. Recordsets can be closed in isolation
by selecting the appropriate level.
Syntax
returnstate = DBClose(level)
Remarks
Typical Examples
Result = DBClose("Northwind.Order Details")
Closes the 'Order Details' Recordset
Result = DBClose("Northwind")
Closes the connection to the Northwind database, and also any Recordsets
which may be open.
6-17-3 DBDelete
Description
Deletes the specified number of records from the current record position. This
function works only at the Recordset level. This function will fail if the
Recordset is opened with a lock of 'Read Only'.
Syntax
returnstate = DBDelete(level, quantity)
Remarks
Typical Examples
Result = DBDelete("Northwind.Order Details", 10)
Delete the next 10 records in the recordset
DBMove("First")
Result = DBDelete("Northwind.Order Details", 10)
Delete the first 10 records.
6-17-4 DBExecute
Description
The DBExecute function allows the execution of miscellaneous commands
and allows for future expansion by supporting new commands without the
need to create more new DB functions.
Syntax
Argument Type Description
returnstate bool Optional. 1 if the function is successful
otherwise 0
level text A text point or constant specifying the
connection level. This should be a field or
recordset level.
Argument Type Description
returnstate bool 1 if the function is successful otherwise 0
level text A text point or constant specifying the
connection level. This should be a field or
recordset level.
quantity int Number of records to delete.