OverrideMemoryDBSettings (Method) - OCR for AnyDoc - Foundation 23.1 - Foundation 23.1 - AnyDoc - external

OCR for AnyDoc Programming Reference Guide

Platform
AnyDoc
Product
OCR for AnyDoc
Release
Foundation 23.1
License

Description

Allows customization of the memory database settings for an AnyApp template. These settings can be applied to the current control path using the ControlPathID property or all control paths. It is recommended that this method be called during Pre-Application as the connection to the memory database is made after the Pre-Application event.

Applicable Events

AnyApp Pre-Application, AnyApp Post-Algorithm, AnyApp Post-Application

Syntax

object.OverrideMemoryDBSettings bSetForControlPathID, [bForceAccess, [strConnectionString]]

Parameters

Object is a reference to the Application object. For more information, see Application Object (page Application Object).

OverrideMemoryDBSettings is the command.

bSetForControlPathID specifies if the settings should be stored under the current control path identifier.

bForceAccess specifies whether the memory database uses Access. This is an optional parameter, the default value is TRUE.

strConnectionString is an optional parameter. If requiring Access, then there is no need to specify the connection string. If this parameter is specified, then the force Access Boolean should be FALSE. If specifying a password, it is encrypted in the configuration file generated by this setting.

Example

To specify Access for the current control path identifier:

OverrideMemoryDBSettings True, True, “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\OcrForAnyDoc\control\AnyDocMemDB.mdb;Persist Security Info=False”

To specify the Memory Database for the current Control Path ID

OverrideMemoryDBSettings True, False, “Provider=SQLNCLI.1;Integrated Security=SSPI;Data Source=dbserver;Persist Security Info=True”

To specify a connection string for the current control path identifier:

OverrideMemoryDBSettings True, False, "connection string"

To specify Access when the Control Path ID is not used

OverrideMemoryDBSettings False, True, “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\OcrForAnyDoc\control\AnyDocMemDB.mdb;Persist Security Info=False”

To specify the Memory Database when the Control Path ID is not used

OverrideMemoryDBSettings False, False, “Provider=SQLNCLI.1;Integrated Security=SSPI;Data Source=dbserver;Persist Security Info=True”