edmiGetDatabaseVersion
EdmiError edmiGetDatabaseVersion(SdaiString location, SdaiString databaseName, SdaiInteger *databaseVersion, SdaiInteger *databaseBlockSize, SdaiInteger *maxModelsInDB)
This function returns information about an EDMdatabase. The database may be either open or closed when invoking the function. When creating an EDMdatabase, the block size is the only configuration parameter that needs to be set by the user. Later, that block size must allways be used when addressing the database. The block size of an EDMdatabase will be returned by this function. Some EDM updates introduce changes in the way internal data is organized in the EDMdatabase. Such changes will result in database incompatibility. To open an EDMdatabase, one must ensure that the version of EDM is compatible with the database. Database versions are identified by a version sequence number. That version number will be returned by this function.If the EDMdatabase cannot be opened due to incompatible database versions, the actual EDMdatabase must be dumped by an EDMserver/EDMinterface that supports the actual EDMdatabase version, and then restored by the actual running EDMserver/EDMinterface. Some users may need an EDMdatabase that allows creating a very high number of models. Others may need few models, but a huge number of instances within each model. To taylor such features, a special version of EDM must be generated by EPM. Databases generated by such special EDM versions will be incompatible with mainstream EDM versions. This function will return the maximum number of models that may be created in a database.  This number must match that of your EDM Version.
Arguments
Type | Name | Comment |
SdaiString | Location | The path to the directory where the database is located. The <location> must be specified as an absolute path of the actual EDMserver. The <location> argument can be specified with and without the directory delimiter character as the last character in the directory path. The directory delimiter character is '\' on the Windows platforms and '/' on the Unix platforms. |
SdaiString | databaseName | Name of the EDMdatabase. |
SdaiInteger | databaseVersion | Address of a variable that will receive the EDMdatabase version identifier of the specified EDMdatabase. |
SdaiInteger | databaseBlockSize | Address of a variable that will receive the database block size of the specified EDMdatabase. |
SdaiInteger | maxModelsInDB | Address of a variable that will receive the maximum number of models in the specified EDMdatabase. |
Return Value
Options
Â
Example
Â
 EdmiError rstat; SdaiString location = "D: databases"; SdaiString databaseName = "PDM"; SdaiInteger dataBaseVersion, databaseBlockSize, maxModelsInDB; . . . if (rstat = edmiGetDatabaseVersion(location, databaseName, &dataBaseVersion, &databaseBlockSize, &maxModelsInDB)) { /* Error in operation */ printf("\nError: %s in edmiGetDatabaseVersion \n", edmiGetErrorText(rstat)); goto error; } printf("\nVersion: %d, BlockSize: %d, Max Models: %d\n", dataBaseVersion, databaseBlockSize, maxModelsInDB); . . .
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â