DBQUERYNAME(database, index)

The DBQUERYNAME function returns the name of a specified query in a database.

database is the name of a database and must include the full path if not in the same directory as the open document.

index is the query number, starting at 1.

For example, you know a database called wineshop, located in a folder c:\ability\samples, contains at least one query:

DBQUERYNAME("c:\ability\samples\wineshop.adb", 1)

returns the name of the first query in the database.

Suppose you enter "c:\ability\samples\wineshop.adb" into a cell in a spreadsheet, say A1. Then the following:

DBQUERYNAME(A1, DBQUERYCOUNT(A1))

returns the name of the last query.

See also:

DBQUERYCOUNT(database)

Other remote functions