PvCheckDbInfo()
Checks the consistency of a database.
Header File: catalog.h (See also
Header Files)
Function First Available In Library: w3dbav75.dll (Windows), libpsqldti.so (Linux), libpsqldti.dylib (macOS) (See also
Link Libraries)
Syntax
BTI_API PvCheckDbInfo(
BTI_LONG hConnection,
BTI_CHAR_PTR dbName,
BTI_ULONG checkFlags);
Arguments
In | hConnection | Connection handle that identifies the server. Connection handles are obtained with the
PvConnectServer() function. |
In | dbName | Name of an existing named database. A list of all named databases for a particular server is obtained with the
PvGetDbNamesData() function. A single named database from the resulting list can be obtained with the
PvGetDbName() function. |
In | checkFlags | Reserved. The function checks for all database flags. |
Return Values
P_OK | The operation was successful. |
P_E_INVALID_HANDLE | Connection handle that identifies the server is invalid. |
P_E_NULL_PTR | The function was called with a null pointer. |
P_E_ACCESS_RIGHT | Insufficient access rights to call the function. |
P_E_NOT_EXIST | Named database specified in dbName does not exist. |
P_E_FAIL | A general failure occurred. |
Remarks
If the database is consistent, then the return value for this function is P_OK. If the database is not consistent or if the function call fails, then the return value is one of the error codes listed above.
Example
BTI_WORD res;
BTI_CHAR_PTR dbName;
BTI_ULONG checkFlags;
BTI_LONG hConnection;
BTI_LONG reserved;
dbName = “demodata”;
checkFlags = 0xFFFFFFFF; // Checks all flags
hConnection = P_LOCAL_DB_CONNECTION;
reserved = 0;
res = PvStart (reserved);
if (res == P_OK)
{
res = PvCheckDbInfo (hConnection,
dbName,
checkFlags);
if (res == P_OK)
{
}
else
{
}
Res = PvStop (&reserved);
}
See Also