IPrimaryMsSqlSPLD.ODBCParams

Syntax

ODBCParams: String;

Description

The ODBCParams property determines a string of additional parameters values.

Comments

Parameters and their values are specified as parameter1=value1;parameter2=value2....

Example

The operating system must have Microsoft SQL Server ODBC driver installed. The network has a server named MSSQLServer, the DataRepository repository is created on the server.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MbMan: IMetabaseManager;
    MbDefs: IMetabaseDefinitions;
    MbDef: IMetabaseDefinition;
    MssqlOdbcSPLD: IPrimaryMsSqlODBCSPLD;
Begin
    MbMan := MetabaseManagerFactory.Active;
    MbDefs := MbMan.Definitions;
    MbDef := MbDefs.Add;
    MbDef.DriverId := 
"MSSQL2012ODBC";
    MbDef.Id := 
"MSSQL_ODBC";
    MbDef.Name := 
"MSSQL_ODBC";
    MbDef.Authentication := AuthenticationMode.Password;
    MbDef.SecurityPackage := 
"STANDARDSECURITYPACKAGE";
    MssqlOdbcSPLD := MbDef.LogonData 
As IPrimaryMsSqlODBCSPLD;
    MssqlOdbcSPLD.Server := 
"MSSQLServer";
    MssqlOdbcSPLD.Database := 
"DataRepository";
    MssqlOdbcSPLD.ODBCParams := 
"MultiSubnetFailover=Yes;ApplicationIntent=ReadWrite";
    MbDef.Save;
End Sub UserProc;

After executing the example, a new description for connecting to the specified repository is created. The connection is implemented using the ODBC driver with the ability to set additional connection parameters.

See also:

IPrimaryMsSqlODBCSPLD