dbname

Returns the name of the current database.

Syntax

LPCSTR dbname ( PDBPROCESS dbproc );

where

dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ SQL Server process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.

Returns

A pointer to the null-terminated name of the current database.

Remarks

If you need to keep track of when the database changes, use dbchange.

See Also

dbchange, dbuse