|
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 0 based.
Header file: CATALOG.HRequires: W3DBAV75.DLL or higher version
BTI_SINT PvGetDbName( BTI_LONG hConnection, BTI_ULONG sequence, BTI_ULONG_PTR pBufSize, BTI_CHAR_PTR dbName);
|
In
|
hConnection
|
Connection handle that identifies the server. Connection handles are obtained with the PvConnectServer() function.
|
|
In
|
sequence
|
The sequence number (0 based) of the database name. Must be within a valid range with upper limit defined by PvGetDbNamesData().
|
|
In/Out
|
pBufSize
|
Address of an unsigned long containing size of buffer allocated to receive the database name. Receives actual size of chars copied. The size should include the null terminator.
|
|
Out
|
dbName
|
String value returned.
|
unsigned long count = 0; BTI_SINT status = 0; BTI_CHAR dbName[BDB_SIZE_DBNAME+1]; unsigned long dbNameSize = BDB_SIZE_DBNAME; status = PvGetDbNamesData(connection, &count); for (i=0; i< count; i++) { status = PvGetDbName(connection, i dbNameSize, dbName); }
The following preconditions must be met:
PvStart()
PvConnectServer()
PvGetDbNamesData()
PvFreeDbNamesData()
PvDisconnect()
PvStop()
|
Chapter contents
Prev topic: PvGetDbFlags()
|