Difference between revisions of "CLOSE DATABASE"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 15: Line 15:
  
 
==See Also==
 
==See Also==
[[ADATABASES()]], [[ALTER INDEX]], [[ALTER TABLE]], [[BACKUP DATABASE]], [[CLOSE TABLES]], [[COMPILE DATABASE]], [[CREATE DATABASE]], [[CREATE TABLE]], [[CREATE INDEX]], [[CREATE VIEW]], [[DB_DATADIR]], [[DBUSED()]], [[DISPLAY DATABASE]], [[DISPLAY INDEXES]], [[DISPLAY TABLES]], [[DROP DATABASE]], [[DROP INDEX]], [[DROP TABLE]], [[GETENV()]], [[LIST DATABASE]], [[LIST INDEXES]], [[LIST TABLES]], [[OPEN DATABASE]], [[RESTORE DATABASE]], [[SET EXCLUSIVE]], [[USE]]
+
[[ADATABASES()]], [[ALTER INDEX]], [[ALTER TABLE]], [[BACKUP DATABASE]], [[CLOSE TABLES]], [[COMPILE DATABASE]], [[CREATE DATABASE]], [[CREATE TABLE]], [[CREATE INDEX]], [[CREATE VIEW]], [[DB_DATADIR]], [[DBUSED()]], [[DISPLAY DATABASE]], [[DISPLAY INDEXES]], [[DISPLAY TABLES]], [[DROP DATABASE]], [[DROP INDEX]], [[DROP TABLE]], [[GETENV()]], [[LIST DATABASE]], [[LIST INDEXES]], [[LIST TABLES]], [[OPEN DATABASE]], [[RESTORE DATABASE]], [[SET EXCLUSIVE]], [[SQL USE|USE]]
  
  

Revision as of 14:30, 19 March 2009

CLOSE DATABASES

Class

Databases


Purpose

Closes the currently open database


Syntax

CLOSE DATABASES [ALL]


See Also

ADATABASES(), ALTER INDEX, ALTER TABLE, BACKUP DATABASE, CLOSE TABLES, COMPILE DATABASE, CREATE DATABASE, CREATE TABLE, CREATE INDEX, CREATE VIEW, DB_DATADIR, DBUSED(), DISPLAY DATABASE, DISPLAY INDEXES, DISPLAY TABLES, DROP DATABASE, DROP INDEX, DROP TABLE, GETENV(), LIST DATABASE, LIST INDEXES, LIST TABLES, OPEN DATABASE, RESTORE DATABASE, SET EXCLUSIVE, USE


Description

The CLOSE DATABASES command closes the currently open database and its tables. If no database is currently open, all tables and their associated files are closed.

Databases in Recital are implemented as directories containing files that correspond to the tables and associated files in the database. Operating System file protection can be applied individually to the files for added security. The directories are sub-directories of the Recital data directory. The environment variable / symbol DB_DATADIR points to the current Recital data directory and can be queried using the GETENV() function. Files from other directories can be added to the database using the ADD TABLE command or via the database catalog and SET AUTOCATALOG functionality.

CLOSE DATABASES does not close gateway sessions. The SET GATEWAY TO or CLOSE ALL commands can be used for this purpose.


Example

VFP/SQL> OPEN DATABASE hr EXCLUSIVE
VFP/SQL> SELECT staff_no, lastname from staff
VFP/SQL> CLOSE DATABASES


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer