IPrimaryMsSqlODBCSPLD.ODBCParamValue

Syntax

ODBCParamValue(Name: String): Variant;

Parameters

Name. Parameter name.

Description

The ODBCParamValue property determines a parameter value with the specified index.

Comments

Parameter names can be obtained in documentation for the ODBC driver, which was used for connection.

Example

The operating system must have Microsoft SQL Server ODBC driver installed. The network has a server named MSSQLServer, the DataRepository schema 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.ODBCParamValue(
"MultiSubnetFailover") := "Yes";
    MssqlOdbcSPLD.ODBCParamValue(
"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