Click or drag to resize

MPInterfacebInitInterface Method (String, String, String, String)

Initialization of the interface with connectivity to the MS-SQL Server of the MARIProject and the SBO databases. The SBO database are indirectly linked via the MPSysConnections table in the MARIProject database.

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public bool bInitInterface(
	string sMSSQLServerName,
	string sMARIProjectDataBaseName,
	string sSQLUID,
	string sSQLPWD
)

Parameters

sMSSQLServerName
Type: SystemString
Name, ip address of the SQL Server or name of the SQL Instance with backslash
sMARIProjectDataBaseName
Type: SystemString
Name of the MARIProject database
sSQLUID
Type: SystemString
sa or other SQL user. Whenn empty trusted connection will be used
sSQLPWD
Type: SystemString
password for sa or other user, When empty trusted connection will be used

Return Value

Type: Boolean
True if sucessfully initialized MARIProject Interface
Remarks
Examples
Initialization Example
//The file MARIProjectConnection.xml is not needed with this version of bInitInterface(Server,db,user,pwd).
MARIInterface.MPInterface MPInterface;
MPInterface = new MARIInterface.MPInterface();
//Initialize the interface including the database credentials
if (MPInterface.bInitInterface("SQLServer", "MARIProjectDemoDB", "sa", "geheim")) {
    // MARIProject user and password
    if (MPInterface.bUserLogin("MARINGO", "")) {

        // Start your code here...
        this.oMPInterface = MPInterface;

    } else {
        //                                           Read results from oError Object
        throw new SystemException("Login failed: " + MPInterface.oErrors.PrintErrors());
    }
} else {
    //                                           Read results from oError Object
    throw new SystemException("Login failed: " + MPInterface.oErrors.PrintErrors());
}
See Also