Top Method Summary
Options Name Purpose
ConnectDatabase (character, character) Connects a database with error handling
CreateDatabaseAliases (character) Creates database aliases based on a configuration string
CreateStFile (CharacterList, character) Creates a new ST file based on a list of areas
Consultingwerk.Util.Enum.DatabaseLicenseTypeEnum DatabaseLicense (character) Returns the license (Workgroup or Enterprise) for the database with the given name
INTEGER DatabaseNumber (character) Returns the sequence number of a database the ABL session is connected to. This sequence number can be used for functions like LDBNAME or the return-value of the GetRecordsReads() method in this class
Consultingwerk.Framework.Collections.CharacterList GetAreasFromDfFile (character) Returns the storage area names of a database based on the DF file
HANDLE GetDbClient (character) Gets the DB-CLIENT
CHARACTER GetDbNameSignature () Returns a comma-delimited list of the logical database names of all connected database names, all alias names and the logical name of the DICTDB
RECID GetDictDbRecid () Returns the RECID of the _DB record
Consultingwerk.Util.DatabaseStatsRangeSize.RangeSize GetRangeSizes () Returns an array of RangeSize objects indicating the suggested values for -basetable, -baseindex, -tablerangesize, -indexrangesize
INT64 GetRecordReads () Returns an int64 array containing the _ActSummary._Summary-RecReads for every connected database
INT64 GetRecordReads (int64[]) Returns an int64 array containing the _ActSummary._Summary-RecReads for every connected database subtracted by the values in a start array.
SetDbClient (handle, character) Sets the DB-CLIENT
CHARACTER UnabbreviatedFieldName (character, character) Returns the unabbreviated field name based on an abbreviated field name
CHARACTER UnabbreviatedTableName (character) Returns the unabbreviated table name based on an abbreviated table name
CHARACTER UnabbreviatedTableName (character, character) Returns the unabbreviated table name based on an abbreviated table name

Top Constructor Summary
Options Name Purpose
DatabaseHelper () Constructor for the DatabaseHelper class


Method Detail
Top

ConnectDatabase (character, character)

Purpose: Connects a database with error handling
Notes:

Parameters:
pcDatabaseName CHARACTER
A database name, used for error messages only
pcConnectParameter CHARACTER
The database connection parameters
Top

CreateDatabaseAliases (character)

Purpose: Creates database aliases based on a configuration string
Notes: The configuration string is a pipe delimited list of
LDBNAME:ALIASNAME ALIASNAME or LDBNAME:ALIASNAME1&ALIASNAME2&...&ALIASNAMEn
sports2000:appdb&dictdb|icfdb:afdb appdb&dictdb|icfdb:afdb

Parameters:
pcAliases CHARACTER
The definition of the aliases to create
Top

CreateStFile (CharacterList, character)

Purpose: Creates a new ST file based on a list of areas
Notes:

Parameters:
poAreas Consultingwerk.Framework.Collections.CharacterList
The storage areas to create
pcStFileName CHARACTER
The name of the storage file
Top

Consultingwerk.Util.Enum.DatabaseLicenseTypeEnum DatabaseLicense (character)

Purpose: Returns the license (Workgroup or Enterprise) for the database with the given name
Notes:

Parameters:
pcDatabaseName CHARACTER
Name of the database whose license type is requested
Returns Consultingwerk.Util.Enum.DatabaseLicenseTypeEnum
The license type of the database with the name in pcDatabaseName
Top

INTEGER DatabaseNumber (character)

Purpose: Returns the sequence number of a database the ABL session is connected
to. This sequence number can be used for functions like LDBNAME or
the return-value of the GetRecordsReads() method in this class
Notes:

Parameters:
pcDatabaseName CHARACTER
The logical database name to return the connect sequence number for
Returns INTEGER
The sequence number of a database the ABL session is connected to or ? when the DB is not connected
Top

Consultingwerk.Framework.Collections.CharacterList GetAreasFromDfFile (character)

Purpose: Returns the storage area names of a database based on the DF file
Notes:

Parameters:
pcFileName CHARACTER
The name of the DF file
Returns Consultingwerk.Framework.Collections.CharacterList
The areas of a database
Top

HANDLE GetDbClient (character)

Purpose: Gets the DB-CLIENT
Notes: Wrapper to GET-DB-CLIENT with better error reporting
Supports comma delimited list of authentication databases and
retrieves the DB-CLIENT of the first database in the list

Parameters:
pcLogicalDatabaseName CHARACTER
The logical database name
Returns HANDLE
The handle of the client-principal
Top

CHARACTER GetDbNameSignature ()

Purpose: Returns a comma-delimited list of the logical database
names of all connected database names, all alias names
and the logical name of the DICTDB
Notes:

Returns CHARACTER
The comma-delimited signature of the connected database
Top

RECID GetDictDbRecid ()

Purpose: Returns the RECID of the _DB record
Notes: Required for invoking some of the data dictionary, data admin API's

Returns RECID
The RECID of the DICTDB _DB record
Top

Consultingwerk.Util.DatabaseStatsRangeSize.RangeSize GetRangeSizes ()

Purpose: Returns an array of RangeSize objects indicating the
suggested values for -basetable, -baseindex, -tablerangesize,
-indexrangesize
Notes:

Returns Consultingwerk.Util.DatabaseStatsRangeSize.RangeSize
The array of RangeSize instances, 1 per database
Top

INT64 GetRecordReads ()

Purpose: Returns an int64 array containing the _ActSummary._Summary-RecReads
for every connected database
Notes:

Returns INT64
The INT64[] containing the _ActSummary._Summary-RecReads per connected DB
Top

INT64 GetRecordReads (int64[])

Purpose: Returns an int64 array containing the _ActSummary._Summary-RecReads
for every connected database subtracted by the values in a start
array.
Notes: This function is useful for computing the actual number of records
read since the GetRecordsReads() (no parameter) methods was called

Parameters:
iStart INT64
An INT64[] containing the start offset for the records read
Returns INT64
The INT64[] containing the _ActSummary._Summary-RecReads per connected DB since the offset was taken
Top

SetDbClient (handle, character)

Purpose: Sets the DB-CLIENT
Notes: Wrapper to SET-DB-CLIENT with better error reporting
Supports setting the DB-CLIENT for a list of database names

Parameters:
phClientPrincipal HANDLE
The handle of the client-principal
pcLogicalDatabaseName CHARACTER
The logical database name
Top

CHARACTER UnabbreviatedFieldName (character, character)

Purpose: Returns the unabbreviated field name based on an abbreviated field
name
Notes:

Parameters:
pcTableName CHARACTER
The table name (possibly abbreviated)
pcFieldName CHARACTER
The field name (possibly abbreviated)
Returns CHARACTER
The unabbreviated field name
Top

CHARACTER UnabbreviatedTableName (character)

Purpose: Returns the unabbreviated table name based on an abbreviated table
name
Notes:

Parameters:
pcTableName CHARACTER
The abbreviated table name, optionally with DB prefix
Returns CHARACTER
The unabbreviated buffer name (including database name)
Top

CHARACTER UnabbreviatedTableName (character, character)

Purpose: Returns the unabbreviated table name based on an abbreviated table
name
Notes:

Parameters:
pcDatabaseName CHARACTER
The database name
pcTableName CHARACTER
The abbreviated table name
Returns CHARACTER
The unabbreviated buffer name (including database name)


Constructor Detail
Top

DatabaseHelper ()

Purpose: Constructor for the DatabaseHelper class
Notes: Disallow instance creation



©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       13.04.2026 10:30:19