%Admin

This method is used to discover information about an object. %Admin can be used with a language server connection object or language object.

All special method names and keywords are case-insensitive.

Syntax

{object->}%Admin(keyword)

Syntax elements

objectA connection object or language object. The default connection object does not have to be named (although it can be).

keywordSelects a required operation:

GetErrorWhen used with a connection object, returns the last error string generated by the language server.

GetErrNumWhen used with a connection object, returns the last error number generated by the language server.

GetMethodsWhen used with a language object, returns a list of methods available on the object:

  • For Java, a newline delimited string of method names.

  • For .NET, a string Array object of method names.

Note that a language object is required for GetMethods.

Applicability

Language server connection objects and language objects.

Examples

Gets the last error message returned by the default language server.

LastError = %Admin(GetError)

Gets the last error number returned by the AlternateLS language server.

LastErrorNo = AlternateLS->%Admin(GetErrorNum)

Gets a list of method names available for the BankAccount object and assigns it to the Transactions variable.

Transactions = BankAccount->%Admin(GetMethods)

See also

DBO Errors and the DataBasic Debugger, Calling Object Methods, %GetError, %GetErrorNum