FILEFLEX API REFERENCE



NAME
DBSelect -- Make a specified database active

SYNTAX
DBSelect(database-ID)

CATEGORY
Managing Database Files

DESCRIPTION
Only one database file can be the current file. You may have numerous database files open at once, but only one of them will be the current database at any one time. The DBSelect function will allow you to choose any open database to act as the current database. To choose a previously opened database as the current file, use the FileFlex function DBSelect. It requires a single argument, the variable into which you put the ID of the database when you opened it with your call to DBUse.

Just as there can only be one current database file, so there can only be one record in that file that is recognized by FileFlex as the "current" record. All operations are performed on or relative to this record. When FileFlex switches between databases, the current record is saved.

An example will make this clearer. Let's assume that there are two databases open: a names database (ID 1) and an addresses database (ID 2). You're currently on the 53rd record of the names database. When you were last in the addresses database, the current record pointer pointed to record number 2,302. Now, when you execute a DBSelect(2), which moves you to the addresses database, the addresses database becomes current and the current record is now 2,302. If you then reselect the names database by issuing a DBSelect(1), the names database becomes current and the current record is 53.


EXAMPLE
put DBSelect(DatabaseID) into dbResult

INTERNAL FUNCTION NUMBER
5


Copyright © 1992-1998 by David Gewirtz, under license to Component Enterprises, Inc.
Contact: info@component-net.com

Casa de Bender