MatchUp Object:Hybrid:Initialization

From Melissa Data Wiki
Revision as of 17:38, 31 July 2015 by Admin (talk | contribs)
Jump to navigation Jump to search

← MatchUp Object Reference

MatchUp Object Hybrid Interface Navigation
Overview
Order of Operations
Functions
Initialization
Mapping
Match Key
Comparison



The following functions prepare the Hybrid interface for use and link it to its supporting data files.

SetPathToMatchUpFiles

This function accepts a string value containing the path to the folder containing the MatchUp Hybrid data files.

This function must be called before calling the InitializeDataFiles function.

To provide maximum compatibility with Windows, three files are installed in your ‘Common App Data’ directory.

Windows Vista and newer
C:\ProgramData\MelissaDATA\MatchUp
Windows XP
C:\Documents and Settings\All Users\Application Data\Melissa DATA\MatchUp

The location of this directory can be changed by users so please note this, as it can often be the source of issues when running the samples/demos.

Syntax mdMU->SetPathToNameFiles(char)
C mdMUHybridSetPathToMatchUpFiles(mdMU, char)
.Net mdMU.PathToMatchUpFiles = string


SetLicenseString

This function passes the license string required for MatchUp Object to function. A value of "1" is returned if the license string is valid, a vlue of "0" is returned for an invalid or empty string.

This function is only required if the environment variable method is not used.

Each customer is issued a license string when purchasing MatchUp Object or renewing a subscription. This string must be passed to this function to unlock the functionality of MatchUp Object.

The license string is normally set using an environment variable, either MD_LICENSE or MD_LICENSE_DEMO. Calling this function is an alternative method for setting the license string, but applications developed for a production environment should only use the environment variable.

When using an environment variable, it is not necessary to call this function.

For more information on setting the environment variable, see Entering Your MatchUp Object License.

Syntax int = mdMU->SetLicenseString(char)
C int = mdMUHybridSetLicenseString(mdMU, char)
.Net integer = mdMU.SetLicenseString string


SetMatchcodeName

This function accepts a string value that must match the name of an existing matchcode in the current matchcode file.

Syntax mdMU->SetMatchcodeName(char)
C mdMUHybridMatchcodeName(mdMU, char)
.Net mdMU.MatchcodeName = string


SetMatchcodeObject

This functions selects the matchcode to use for the current Hybrid deduping operation.

This function largely duplicates the purpose of the SetMatchcodeName function, but instead of accepting a character value containing the name of a matchcode in the current matchcode file, this function accepts a Matchcode object created using the Matchcode Editor interface.

Because this function requires the use of a separate interface to create the Matchcode object variable, it is normally simpler to use the SetMatchcodeName function.

It is possible, however, to use this function to build a new matchcode on the fly using the Matchcode Editor interface. Unless a specific application demands such flexibility, it is usually much simpler to add a new matchcode to the matchcode file and call it using the SetMatchcodeName function.

Syntax mdMU->SetMatchcodeObject(mdMUMatchcode)
C mdMUHybridSetMatchcodeObject(mdMU, mdMUMatchcode)
.Net mdMU.MatchcodeObject = mdMUMatchcode


InitializeDataFiles

This function opens the needed data files and prepares the MatchUp Object for use.

Before calling this function, the application must have successfully called the SetLicenseString and SetPathToMatchUpFiles functions.

Check the return value of the GetInitializeErrorString function to retrieve the result of the initialization call. Any result other than “No Error” means the initialization failed for some reason.

This returns a value of the enumerated type ProgramStatus.

Value Enumeration Description
0 ErrorNone No error - Initialization was successful.
1 ErrorConfigFile Could not find mdMatchUp.dat.
2 ErrorLicenseExpired The License String has expired.
3 ErrorDatabaseExpired The database has expired.
4 ErrorMatchcodeNotSpecified No matchcode was specified.
5 ErrorMatchcodeNotFound Specified Matchcode does not exist.
6 ErrorInvalidMatchcode The specified matchcode is not valid.

If any other value other than "ErrorNone" is returned, check the GetInitializeErrorString function to see the reason for the error.

Syntax ProgramStatus = mdMU->InitializeDataFiles()
C ProgramStatus = mdMUHybridInitializeDataFiles(mdMU)
.Net ProgramStatus = mdMU.InitializeDataFiles


GetInitializeErrorString

This function returns a string to describe the error caused when the InitializeDataFiles function cannot be successfully called.

The possible strings returned by this function are:

  • "No error"
  • "Could not find mdMatchUp.dat."
  • "The License String has expired."
  • "The database has expired."
  • "No matchcode was specified."
  • "Specified Matchcode does not exist."
  • "The specified matchcode is not valid."
  • "The specified key file was not found."

This function returns a string describing the error caused when the InitializeDataFiles function cannot be called successfully.

Syntax char = mdMU->GetInitializeErrorString()
C char = mdMUHybridGetInitializeErrorString(mdMU)
.Net string = mdMU.GetInitializeErrorString


GetBuildNumber

This function returns the current development release build number of MatchUp Object.

Syntax char = mdMU->GetBuildNumber()
C char = mdMUHybridGetBuildNumber(mdMU)
.Net string = mdMU.GetBuildNumber


GetDatabaseDate

This function returns a string value that represents the revision date of the MatchUp Object data files.

Syntax char = mdMU->GetDatabaseDate()
C char = mdMUHybridGetDatabaseDate(mdMU)
.Net string = mdMU.GetDatabaseDate


GetDatabaseExpirationDate

This function returns a string value containing the expiration date of the current database fil (mdMatchUp.dat).

Syntax char = mdMU->GetDatabaseExpirationDate()
C char = mdMUHybridGetDatabaseExpirationDate(mdMU)
.Net string = mdMU.GetDatabaseExpirationDate


GetLicenseExpirationDate

This function returns a string value containing the expiration date of the current license string. After this date, MatchUp Object will no longer function.

Syntax char = mdMU->GetLicenseExpirationDate()
C char = mdMUHybridGetLicenseExpirationDate(mdMU)
.Net string = mdMU.GetLicenseExpirationDate