PvGetDbName()
Gets the name of a database on a connected server using a sequence number. You can obtain the number of database names by calling the PvGetDbNamesData() function. The sequence number is 1 based.
Header File: catalog.h (See also Header Files)
Function First Available In Library: w3dbav75.dll (Windows), libpsqldti.so (Linux), libpsqldti.dylib (OS X) (See also Link Libraries)
Syntax
BTI_API PvGetDbName(
   BTI_LONG           hConnection,
   BTI_ULONG          sequence,
   BTI_ULONG_PTR      pBufSize,
   BTI_CHAR_PTR       dbName);
Arguments
 
Return Values
 
Example
BTI_ULONG i;
BTI_ULONG count = 0;
BTI_CHAR dbName[BDB_SIZE_DBNAME+1];
BTI_SINT status = PvGetDbNamesData(connection, &count);
for (i=1; i<= count; i++)
{
   BTI_ULONG dbNameSize = sizeof(dbName);
   status = PvGetDbName(connection, i, &dbNameSize, dbName);
}
status = PvFreeDbNamesData(connection);
Remarks
The following preconditions must be met:
Connection established by PvConnectServer() or if you are performing the operation on a local machine, P_LOCAL_DB_CONNECTION may be used as the connection handle.
See Also
PvStart()
PvConnectServer()
PvGetDbNamesData()
PvFreeDbNamesData()
PvDisconnect()
PvStop()