Opens the specified repository for the specified access mode. No access is permitted to a repository before it is opened.
The legal access modes are:
sdaiRO : open for read only operations.
sdaiRW : open for read and write operations.
Related functions: edmiOpenRepository, sdaiOpenRepository , sdaiOpenRepositoryBN
Header:
#include "sdai.h"
Prototype:
EdmiError edmiOpenRepositoryBN (SdaiString repositoryName,
SdaiAccessMode mode,
SdaiRepository *repositoryId);
Arguments:
repositoryName |
Specifies the name of the repository to be opened. Repository names are case sensitive. |
mode |
The open mode of the repository. (sdaiRO/sdaiRW) |
repositoryId |
An address to a SdaiRepository variable that will receive a numeric repositoryID that uniquely identifies the opened repository in an EDMdatabase . |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
SdaiRepository repositoryId;
. . .
if (rstat = edmiOpenRepositoryBN ("PDM", sdaiRW, &repositoryId)) {
/* Error in operation */
printf("\nError: %s in edmiOpenRepositoryBN\n",
edmiGetErrorText(rstat));
goto error;
}
. . .