Eplan Platform API
Eplan.EplApi.MasterData Namespace / MDPartsManagement Class / OpenDatabase Method / OpenDatabase(String) Method
The file name of Eplan database or a string for selecting a SQL Server database. The syntax of that string is: "Server|Database|0" Windows authentication "Server|Database|2|Username|Password" SQL Server authentication, username and password not encrypted.

In This Topic
    OpenDatabase(String) Method
    In This Topic
    Opens the given parts database.
    Syntax
    public MDPartsDatabase OpenDatabase( 
       string databaseName
    )
    public:
    MDPartsDatabase^ OpenDatabase( 
       String^ databaseName
    ) 

    Parameters

    databaseName
    The file name of Eplan database or a string for selecting a SQL Server database. The syntax of that string is: "Server|Database|0" Windows authentication "Server|Database|2|Username|Password" SQL Server authentication, username and password not encrypted.
    Exceptions
    ExceptionDescription
    Thrown when database name is null
    Thrown when database name is empty
    Thrown when it was not possible to connect with the database. Please refer to the system messages for further information.
    Remarks
    OpenDatabase method does not automatically update a parts database from a previous to the current version. Databases in an older format will be opened read-only. You can check whether the database format is up-to-date by the property MDPartsDatabase.IsSchemeUpToDate and update it if needed by the method MDPartsDatabase.UpdateScheme(). Parts databases prior to version 2022 need to be upgraded / converted either manually or by the action XPamConvertPartDatabaseToArticleDatabaseAction /OldDatabase... /NewDatabase...
    See Also