Harness proD API Help
EPLAN.Harness.API Namespace / Library Class / CreateSqlLibrary Method / CreateSqlLibrary(String,String,String,String,Boolean) Method
Server name.
The name of the database being created.
SQL authentication user name.
SQL authentication password.
Remember the password for future using?
Example
In This Topic
    CreateSqlLibrary(String,String,String,String,Boolean) Method
    In This Topic
    Create new MS SQL Server library using SQL authentication.
    Syntax

    Parameters

    server
    Server name.
    databaseName
    The name of the database being created.
    userName
    SQL authentication user name.
    password
    SQL authentication password.
    rememberPassword
    Remember the password for future using?

    Return Value

    Connection to the created MS SQL Server library.
    Exceptions
    ExceptionDescription
    Api is not in an initialized state. You can get current state from Status property. If API is uninitialized, you can initialize it by calling Init(String,String[]) method. If API is in failed state, you can not resurrect it.
    Argument is invalid. The exception is thrown when a wrong argument is passed to the method or the setter of property.
    Argument is null.
    The operation was not successful.
    Remarks

    After this method is called the new MS SQL Server library is only created, not connected.

    If connection is required use the ConnectToLibrary(BaseLibraryConnection,String,String,Boolean) method and pass it the returned library connection.

    Example
    This example shows how to create new MS SQL Server library using SQL authentication.
    Library library = Library.GetInstance();
    
    library.CreateSqlLibrary("server", "database name", "user name", "password");
    This example shows how to create new MS SQL Server library using SQL authentication (remember password).
    Library library = Library.GetInstance();
    
    library.CreateSqlLibrary("server", "database name", "user name", "password", true);
    This example shows how to create new MS SQL Server library and connect to it.
    Library library = Library.GetInstance();
    
    SqlLibraryConnection connection = library.CreateSqlLibrary("server", "database name", "user name", "password");
    library.ConnectToLibrary(connection, "user name", "password");
    See Also