MatchUp Object:Hybrid:Initialization
MatchUp Object Hybrid Interface Navigation | |||||
---|---|---|---|---|---|
Overview | |||||
Order of Operations | |||||
|
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.SetPathToMatchUpFiles = 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 | mdMUHybridSetMatchcodeName(mdMU, char) |
.Net | mdMU.SetMatchcodeName = 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.SetMatchcodeObject = mdMUMatchcode |
SetReserved
Optional. This function accepts two parameters: A string parameter containing the property to be set; and a string parameter representing the value for the property being set.
It must be called before calling the InitializeDataFiles function.
Syntax | mdMU->SetReserved(char, char) |
---|---|
C | mdMUHybridSetReserved(mdMU, char, char) |
.Net | mdMU.SetReserved(string) |
SetMaximumCharacterSize
Optional. This function will accommodate UTF-8 input data. Since a single UTF-8 character can be up to 4 bytes long, the storage of the matchcode keys may need to be altered to accommodate this maximum size. However, if you are working in a part of the world where you are sure that a byte sequence will always be shorter, you can use this function to override the storage overhead.
It must be called before calling the InitializeDataFiles function.
Valid input values are 1, 2, 3 or 4. Invalid values will be ignored and the default size (e.g. if this function is not called) is 1.
Syntax | mdMU->SetMaximumCharacterSize(int) |
---|---|
C | mdMUHybridSetMaximumCharacterSize(mdMU, int) |
.Net | mdMU.SetMaximumCharacterSize(integer) |
SetEncoding
Optional. This function define encoded format of the input file and the resultant format of the build keys. Input data is converted into the UTF-8 format and processed as such. When GetKey is called, the data is converted back from UTF-8 to the specified input format.
The return value is 1 if the desired encoding can be set or 0 if the encoding is not recognized or can not be set.
It must be called before calling the InitializeDataFiles function.
The default encoding type is "ISO-8859-1", if this function is not used.
Syntax | mdMU->SetEncoding(char) |
---|---|
C | mdMUHybridSetEncoding(mdMU, char) |
.Net | mdMU.SetEncoding(string) |
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 |