Using the 'dbname' Option

You can use the 'dbname' option to retrieve the name of the current database. This option returns the identifier of the database to which the client session is currently connected.

In the following example, the user enters the 'dbname' option of DBINFO in a SELECT statement to retrieve the name of the database to which DB-Access is connected:
SELECT DBINFO('dbname') 
   FROM systables
   WHERE tabid = 1;
The following table shows the result of this query.
(constant)
stores_demo