Developer Documentation Library > Data Model > Accessing the UNICOM Intelligence Data Model > Working with the Case Data Model > Connecting to the UNICOM Intelligence Data Model > Connection properties
 
Connection properties
The OLE DB Provider uses the standard OLE DB property framework to pass properties to CDSCs. Custom properties are used when suitable standard properties are not available.
Properties of type String, Long, or Boolean can be specified as part of a connection string. Properties of type IUnknown can be set programmatically only.
All properties specified as read/write can be modified at any point during a connection's lifetime. This means you can change timeouts, language locales, and MDM object pointers without disconnecting. However, this functionality has not been tested.
The custom property names in this documentation are prefixed with MR Init only. This is how the custom properties must be specified for initialization. However, another form of each custom property is available with an MR prefix. This is for use only when the property is used programmatically.
Standard connection properties
Connect Timeout
The length of time, in seconds, to wait for the initialization to complete. (Read/Write)
Data type: Long
Data Source
The CDSC name to be used with the connection. This is the component name of the CDSC ProgID (for example, mrRdbDsc). This property can also be used to specify a separate UDL file that contains all of the initialization settings. To use a separate UDL file, connect as: UDL://<UDL File Path>
Data type: String
Initial Catalog
The full or relative path to an MDM document (.mdd) file or a metadata source for which an MDSC is available (in which case the name of the MDSC should be given in the MR Init MDSC property).
Data type: String
Location
The name or location of the data source. For file or directory-based data stores, this is the path to the file or directory. The provider will treat a relative path as being relative to the metadata file specified in the Initial Catalog property. If Initial Catalog is not set, the provider treats a relative path as being relative to the current directory. The provider resolves a relative path to an absolute path before passing it to the CDSC. For OLE DB-based data stores, this is the OLE DB connection string. For more information, see Connecting to a relational MR database.
If issues occur when you put double quotes around the contents of the Location string, try using single quotes instead. Single quotes might work better with the connection string builder as well.
Data type: String
Mode
This is used internally to filter the CDSCs in the Data Link Properties dialog, so that only read-enabled CDSCs are listed when the Mode setting is read, for example. Other uses of this property are reserved for future use. Valid values include:
Mode=1 (Read)
Mode=2 (Write)
Mode=3 (ReadWrite)
Data type: String
Password
The password used to connect to the data source.
Data type: String
User ID
The User ID used to connect to the data source.
Data type: String
Custom connection properties
In this list, the custom properties are shown with the MR Init prefix. However, each of these properties is available in two forms, one with an MR prefix and the other with an MR Init prefix. You must always use the MR Init version of the properties for initialization. The MR version of the properties can be used programmatically only. After the connection has been made, the MR Init version represents the value with which the property was initialized, whereas the MR version represents the current setting of the property for the connection.
The MR Init MDM document property allows an instantiated MDM Document pointer to be passed to the Provider. It is assumed that when the Document pointer property is set, any MDM document previously referenced will be released, and that the reference count on the new MDM document will be incremented. Note that although the MR Init MDM document property can be either an MDM document object or a string representing an MDM document object, the MR version of this property must always be an MDM document object.
MR Init Allow Dirty
The dirty data write mode. Allowing dirty data generates warnings rather than errors when dirty data is encountered. This setting is ignored if the value of the MR Init Validation setting is False. The default value is False. (Read/Write)
Data type: Boolean
MR Init Category Names
Specifies whether the Provider is to output category values or names. The default value of 0 indicates that the values are used. A value of 1 indicates that the names are used. This property can be used only if MDM mapped category values are selected for the MR Init Category Values property. (Initialization-only property.)
When working with large datasets in the Delimited Text DSC, you will want to set the property MR Init Category Names=1 in the connection string. This will use the category name or category mapped value for category question(s) during data transformation, which will significantly increase performance when exporting data.
Data type: Long
MR Init Category Values
Specifies whether the MDM mapped category values are used or whether the native values are used. The default value of 0 indicates that the MDM mapped category values should be used. A value of 1 indicates that the native values should be used. If no MDM document is available, the native values are used. What the native values represent depends upon the DSC and the nature of the underlying case data. The native values might represent the actual raw values stored in the case data. However, this is not always possible and then the native values are identifiers for the categories. (Initialization-only property.)
Data type: Long
MR Init Custom
This property is used by several UNICOM Intelligence DSCs to access special settings provided by the client application. For more information, see:
Connecting to a relational MR database using RDB DSC 2
Custom connection properties used by the UNICOM Intelligence Data File CDSC
Properties and settings used by the SPSS Statistics SAV DSC
Custom connection properties used by QDI/DRS DSC
Custom connection properties used by Log DSC
Custom connection properties used by the Triple-S DSC
Custom connection properties used by the Delimited Text DSC
Properties and settings used by SAS DSC
This property can also be used by third party DSC developers to pass custom initialization information to their DSCs.
Data type: String
MR Init Input Locale
The locale ID to use when parsing input data. (Read/Write)
Data type: Long
MR Init MDM Access
Specifies the access mode for the MDM document being loaded from a .mdd file. A value of 0 specifies that the MDM document should be opened for read-only access. A value of 1 specifies that the MDM document should be opened for read/write access, and any changes will be written back to the .mdd file when the connection is closed. A value of 2 specifies that the MDM document should be opened for read/write access, but any changes will not be written back to the .mdd file. The default access mode is 0, read-only access. (Initialization-only property.)
Data type: Long
MR Init MDM Context
The current context to be used for the connection. (Read/Write)
Data type: String
MR Init MDM DataSource Use
The Provider automatically searches the MDM document for a DataSource object whose CDSCName property matches the value specified in the Data Source connection property and whose DBLocation property matches the Location connection property. This property defines what action the Provider is to take if a matching DataSource object is not found. For more information, see About the MDM DataSource object. (Initialization-only property.)
Data type: Long
MR Init MDM document
An instantiated MDM document pointer or (for the MR Init version of this property only) a string representing an instantiated MDM document pointer. The Document object string should be created using the CreateDocumentObjectString method of the Data Link Helper class. For information on this class, see Connecting using an open MDM document. (Read/Write)
Data type: String (MR Init version only) or IUnknown
MR Init MDM Label Type
The current label type to be used for the connection. (Read/Write)
Data type: String
MR Init MDM Language
The current language to be used for the connection. (Read/Write)
Data type: String
MR Init MDM Version
The version of the MDM document to load. The value of this property can also be an expression that defines two or more versions to be combined as a superversion to load. For more information, see Version expressions. (Read/Write)
Data type: String
MR Init MDM Version Variable
This property is used to specify whether the MDM version variable should be enabled. The MDM version variable is an autogenerated derived variable that is enabled using the IDocument.EnableMetadataVersionVariable property. The default value of False indicates that the version variable is not enabled and a value of True indicates that the version variable is enabled. The version variable is named DataCollection.MetadataVersion. For more information, see System variables.
Data type: Boolean
MR Init MDSC
The MDSC to be used to load the metadata defined in the Initial Catalog setting. This property is ignored if Initial Catalog is not specified. (Initialization-only property.)
Data type: String
MR Init MDSC Access
Specifies the access mode for the MDM document being generated by the MDSC. A value of 0 specifies that the MDM document should be opened for read-only access. A value of 1 specifies that the MDM document should be opened for read/write access, and any changes will be written back to the MDSC when the connection is closed. A value of 2 specifies that the MDM document should be opened for read/write access, but any changes will not be written back to the MDSC. The default access mode is 2. (Initialization-only property.)
When an MDSC is being used to generate the MDM document, mrOleDb ignores the MR Init MDM Access setting.
Data type: Long
MR Init Native Filter
The connection property can be used to specify an expression that will be evaluated by the CDSC for all statements run on the connection. In effect, this connection property can be used to set a global filter that is evaluated natively by the CDSC.
By default the connection property is not set. When set, the specified expression is validated when the connection is opened. When the expression is not valid, or cannot be evaluated by the selected CDSC, an error is returned.
Data type: String
MR Init Native Schema
Specifies whether the native objects in the underlying database should be exposed directly as UNICOM Intelligence Data Model variables, without any interpretation. The default value of False indicates that the DSC should represent native database objects in a way that makes most sense in the UNICOM Intelligence Data Model. A value of True indicates that the DSC should expose native database objects without interpretation. For example, if a value of True is specified, a multiple dichotomy set in a .sav file would be represented as several long or text variables instead of one categorical variable.
Data type: Boolean
MR Init Output Locale
The locale ID to use when formatting output data, such as error or warning messages. (Read/Write)
Data type: Long
MR Init Overwrite
Specifies whether the CDSC deletes the output data if it exists, before writing new data. The default value of 0 indicates that the CDSC should not overwrite existing data, but only append to the output data, if it exists. A value of 1 indicates that the CDSC should delete the output data and schema, which allows output data to be created with a different schema. A value of 2 indicates that the CDSC should delete any existing data records, but retain the native schema if possible. For some CDSCs, such as the Delimited Text DSC, the schema will be lost when the data is deleted, so the result will be the same for values of 1 and 2.
Data type: Long
MR Init Project
For CDSCs that support multiple projects, this property is used to specify the project to connect to. (Read/Write)
Data type: String
MR Init Validation
Enables or disables any data validation performed during a write. The default value is True. (Read/Write)
Data type: Boolean
Example
In these examples, each connection property is presented on a separate line for clarity. In practice you should specify the connection string without line breaks.
The following is a connection string for the Quanvert DSC. The connection will attempt to open the Museum example Quanvert database. The Provider will return category names rather than values because the MR Init Category Names property is set to 1:
Provider=mrOleDB.Provider.2;
Persist Security Info=False;
User ID="";
Data Source=mrQvDsc;
Location=[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Data\Quanvert\Museum\qvinfo;
Extended Properties="";
Initial Catalog=[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Data\Quanvert\Museum\qvinfo;
Mode=3;
MR Init MDSC=mrQvDsc;
MR Init MDM Version="";
MR Init MDM Language="";
MR Init MDM Context="";
MR Init MDM Label Type="";
MR Init MDM Access=0;
MR Init MDM DataSource Use=0;
MR Init Category Names=1;
MR Init Category Values=0;
MR Init Allow Dirty=False;
MR Init Validation=True;
MR Init Input Locale=0;
MR Init Output Locale=0;
MR Init Project="";
MR Init Custom="";
MR Init MDM document=""
You do not need to specify connection properties for which the default values are being used. This means that this connection string can be simplified to specify only those properties for which the defaults are not being used as follows:
Provider=mrOleDB.Provider.2;
Data Source=mrQvDsc;
Location=[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Data\Quanvert\Museum\qvinfo;
Extended Properties="";
Initial Catalog=[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Data\Quanvert\Museum\qvinfo;
MR Init MDSC=mrQvDsc;
MR Init Category Names=1
For more information, see Connecting to case data with and without metadata.
See also
Connecting to a relational MR database
Connecting to a relational MR database using RDB DSC 2
Connecting to the UNICOM Intelligence Data Model
Data Link Properties: Connection
Connecting to the UNICOM Intelligence Data Model