Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The meaning of the response value depends on the service.

Parameters

ParameterDescription
Service
@ServiceThe name of the service being requested. Required.
Param1 - Param10
@ParamsGeneric parameters. Refer to a specific service to determine the actual parameters used.

Remarks

This module provides several useful services for high level interaction with database tables and rows.

Services

ServiceDescription
VerifyLHAll

CalculateColumn

Usage:
Database_Services('

VerifyLHAll

CalculateColumn')

Comments:

Performs a health check against all attached tables and returns back any issues. Returns two lists which are delimited by an @RM. The first list is an @FM list of attached tables. The second list is an @FM list of results (groups that have GFEs or an empty string if there are none). Items in each list correspond which each other based on their list position

Called directly from within a calculation column. The name of the table and column is derived from the call stack and the associated table commuter, if it exists, is called with the appropriate arguments.

Returns:
The result of the calculated column.

ClearTableHandle

Usage:
Database_Services('ClearTableHandle', TableName)

Comments:
Clears the table handle array array from cache. This will force the GetTableHandle service to call the Open statement again.

Returns:
N/

A

VerifyLH

DeleteDataRow

Usage:
Database_Services('

VerifyLH

DeleteDataRow',

Tablenames, SaveList

TableName, KeyID, IgnoreSelfLock, IgnoreMFSRoutines)

Comments:

Performs a health check against

Deletes a data row for the indicated

tables and returns back any issues. Note: This uses the Verify_LH subroutine to check for GFEs. All results are stored in the SYSLHVERIFY table with a KeyID of VolumeLabel*DatabaseID*TableName. Returns the list of groups that have GFEs or returns an empty string if there are none. The list of GFEs or empty strings will themselves be @FM delimited to correspond with the tables passed into this service.

Key ID and database table.

Returns:
N/A

GetKeyIDLock

Usage:
Database_Services('GetKeyIDLock', TableName, KeyID, IgnoreSelfLock)

Comments:
Attempts to perform a semaphore lock on the indicated tablename and Key ID.

Returns:
A Boolean flag indicating if the lock request was successfully performed.

GetTableCommuter

Usage:
Database_Services('GetTableCommuter', TableName)

Comments:
Returns the name of the indicated table's commuter module if it exists. If it does not exist then an empty string will be returned.

Returns:
See comments.

GetTableHandle

Usage:
Database_Services('GetTableHandle', TableName)

Comments:
Returns an @FM list of currently attached OpenInsight database tables.

Returns:
The handle array created by the Open statement.

GetTableNames

Returns:
N/A

GetTableProperties

Usage:
Database_Services('

GetTableProperties

GetTableNames',

TableName

ApplicationTablesOnly, ExcludeDictionaries, ExcludeIndexes)

Comments:
Returns an array of information related to the database table being passed in.

Returns:

N/AGetTableHandle

See comments.

GetTableProperties

Usage:
Database_Services('

GetTableHandle

GetTableProperties', TableName)

Comments:
Returns an array of information related to the database table being passed in.

Returns:
An @FM delimited array of table information:


The most current error message.

AttributeDescription
<1>Database ID
<2>MFS/BFS list
<3>Volume Label (if available)
<4>Volume Path (if available)
<5>BFS (if available)


GetUserLocks

ClearTableHandle

Usage:
Database_Services('

ClearTableHandle

GetUserLocks'

, TableName

)

Comments:

Clears the table handle array array from cache. This will force the GetTableHandle service to call the Open statement again

Note, this can only be done with the UD 5. This can also cause instability with the current session and may require the Task Manager to close the session.

Returns:

The stack of error messages

Returns a dynamic array of user lock information.

ReadDataRow

IsKeyIDLocked

Usage:
Database_Services('

ReadDataRow

IsKeyIDLocked', TableName, KeyID,

NotExpired, ExpirationDuration, IgnoreMFSRoutines

IgnoreSelfLock)

Comments:

Reads a data row

Returns a Boolean flag of the lock status for the indicated table and Key ID

and database table

.

Returns:

True if there is an error condition, False if there is no error condition

See comments.

WriteDataRow

IsKeyIDSelfLocked

Usage:
Database_Services('

WriteDataRow

IsKeyIDSelfLocked', TableName, KeyID

, DataRow, IgnoreSelfLock, IgnoreMFSRoutines, IgnoreAllLocks

)

Comments:

Writes a data row

Returns a Boolean flag of the self-lock status for the indicated table and Key ID

and database table

.

Returns:

True if there are no error conditions, False if there is an error condition.

See comments

ReadDataRow

DeleteDataRow

Usage:
Database_Services('

DeleteDataRow

ReadDataRow',

TableName

KeyID,

KeyID

NotExpired,

IgnoreSelfLock

ExpirationDuration, IgnoreMFSRoutines)

Comments:

Deletes

Reads a data row for the indicated Key ID and database table.

Returns:

N/AGetKeyIDLock

The requested data row.

ReleaseKeyIDLock

Usage:
Database_Services('

GetKeyIDLock

ReleaseKeyIDLock', TableName, KeyID

, IgnoreSelfLock

)

Comments:
Attempts to

perform

release a semaphore lock on the indicated tablename and Key ID.

Returns:

N/AReleaseKeyIDLock

A Boolean flag indicating if the lock release was successfully performed.

SearchIndex

Usage:
Database_Services('

ReleaseKeyIDLock

SearchIndex', TableName, ColumnName, SearchValue,

KeyID

UpdateIndex)

Comments:

Attempts to release a semaphore lock on the indicated tablename and Key ID

Returns an @FM delimited list of Key IDs that match the search value.

Returns:

N/A

See comments

SetTableAlias

Usage:
Database_Services('SetTableAlias', TableName, AliasName, Volume, DatabaseID)

Comments:
Attempts to create an alias for the indicated table, volume, and database. It returns a True$ if successful or a False$ if unsuccessful.

Returns:

N/ASearchIndex

A Boolean flag indicating if the alias request was successfully performed.

UnlockKeyID

Usage:
Database_Services('

SearchIndex

UnlockKeyID', TableName,

ColumnName, SearchValue, UpdateIndex

KeyID)

Comments:

Returns an @FM delimited list of Key IDs that match the search value

Attempts to unlock the indicated Key ID from the indicated Table Name. Note, this can only be done with the UD 5.

Returns:

N/ACalculateColumn

A Boolean flag indicating if the unlock request was successfully performed.

VerifyLH

Usage:
Database_Services('

CalculateColumn

Returns:
N/A

GetTableCommuter

Usage:
Database_Services('GetTableCommuter', TableName)

Comments:
Returns the name of the indicated table's commuter module if it exists. If it does not exist then an empty string will be returned.

Returns:
N/A

GetUserLocks

Usage:
Database_Services('GetUserLocks')

Comments:
Returns a dynamic array of user lock information. Note, this can only be done with the UD 5. This can also cause instability with the current session and may require the Task Manager to close the session.

Returns:
N/A

IsKeyIDLocked

VerifyLH', Tablenames, SaveList)

Comments:

Called directly from within a calculation column. The name of the table and column is derived from the call stack and the associated table commuter, if it exists, is called with the appropriate arguments.

Performs a health check against the indicated tables and returns back any issues. Note: This uses the Verify_LH subroutine to check for GFEs. All results are stored in the SYSLHVERIFY table with a KeyID of VolumeLabel*DatabaseID*TableName. Returns the list of groups that have GFEs or returns an empty string if there are none. The list of GFEs or empty strings will themselves be @FM delimited to correspond with the tables passed into this service.

Returns:
An @FM delimited array of table names and associated GFE information.

VerifyLHAll

Usage:
Database_Services('

IsKeyIDLocked', TableName, KeyID, IgnoreSelfLock

VerifyLHAll')

Comments:

Returns a Boolean flag of the lock status for the indicated table and Key ID.

Returns:
N/A

IsKeyIDSelfLocked

Usage:
Database_Services('IsKeyIDSelfLocked', TableName, KeyID)

Comments:
Returns a Boolean flag of the self-lock status for the indicated table and Key ID.

Returns:
N/A

UnlockKeyID

Performs a health check against all attached tables and returns back any issues.

Returns:
Returns two lists which are delimited by an @RM. The first list is an @FM list of attached tables. The second list is an @FM list of results (groups that have GFEs or an empty string if there are none). Items in each list correspond which each other based on their list position.

WriteDataRow

Usage:
Database_Services('

UnlockKeyID

WriteDataRow', TableName, KeyID, DataRow, IgnoreSelfLock, IgnoreMFSRoutines, IgnoreAllLocks)

Comments:

Attempts to unlock

Writes a data row for the indicated Key ID

from the indicated Table Name. Note, this can only be done with the UD 5

and database table.

Returns:
N/A

...

Params

The proper use of the generic arguments are defined in the definition of each service above.

...