GETINFO
8.0.5, PLBCMP GUI Only
The GETINFO instruction retrieves information for various objects and program environments. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
keyword
Required. One of the keywords from the table below.
dest
Required. A previously defined Character String Variable or DATALIST object.
option
Optional. One of the options from the table below.
Flags Affected: EOS, OVER
Note the following:
The {keyword} operand defines the information that is retrieved. It must be from the following table:
|
Keyword |
Retrieves ... |
|
DATASOURCE |
the ODBC database sources and descriptions that are available. {dest} must be a DATALIST object. If a string variable is specified, nothing is returned. This keyword is not supported by PLBClient. |
|
the exception error data after an O145 error has occurred. | |
|
FONTS |
the available Windows fonts. The {dest} may be a DATALIST object, FONT object, or a string variable. If the {dest} is a FONT object or a string variable, the default font is returned. If the {dest} is a FONT object and the PRINTER={pfile} is not used, the default font of the MAINWINDOW is returned. If the {dest} is a FONT object and the PRINTER={pfile} is used, then the current printer font for the {pfile} is returned. Note, that the PRINTER {pfile} must be opened with a PRTOPEN instruction to have data returned. |
|
PRINTERS |
the Windows printers into a DATALIST object or a string variable. If {dest} is a string variable, the default printer name is returned. |
|
information about the Windows operating system. | |
|
information about a specific DBFILE variable opened using ODBC. This keyword does not provide information when the DBFILE is opened using the ADO driver, MYSQL driver, or the SQLite driver. See Note (8.) for more details. This information is not available when running as a PLBCLIENT. | |
|
information about a specific FONT object. | |
|
information about a specific PFILE variable. |
The {dest} operand specifies the variable that receives the requested information. It may be a string variable or a DATALIST object.
The {option} operand further defines the requested information and must be from the following list:
|
Option |
Restrictions |
|
This option is only allowed for the TYPE={dbfile} form of the statement. {table} must be a string variable or literal containing the name of the table. | |
|
This option is only allowed for the TYPE={dbfile} form of the statement. | |
|
This option is only allowed when the TYPE={font} specifies a FONT object or for the FONTS keyword. This option specifies that the font information is retrieved relative to an opened {pfile} instead of the screen. For the FONTS keyword, the printer fonts are returned to the {dest} DATALIST. | |
|
This option is only allowed for the TYPE={dbfile} form of the statement. | |
|
This option is only allowed for the TYPE={dbfile} form of the statement. | |
|
UNITS={unitid} |
This option allows specification of the units used or returned for this GETINFO statement. A value of CURRENT uses the current units in use for a device context. Other available values are LOENGLISH, HIENGLISH, LOMETRIC, HIMETRIC, PIXELS, and TWIPS. The UNITS option is only available for the SYSTEM, TYPE={pfile} or TYPE={font} keywords.
When the {unitid} value of CURRENT is used for the TYPE={pfile} keyword, the current print positions found at offsets 230 and 238 in the returned data are returned as PIXEL values when the current units for the {pfile} is '*CHARS'. |
The OVER flag is set if nothing is available or the runtime was unable to retrieve the information.
The EOS flag is set if the output variable is too small to receive all of the information.
Additional information regarding this instruction is available from PDF GETFILE and GETINFO Notes.
When running under the PL/B Web Server, only valid information from the client is returned. This includes the operating system type, the screen width, the screen height, and the color bits. Datasource, Fonts, Tables, and Colum*LASTns information is not available.
The GETINFO TYPE={dbfile} instruction only provides information for a DBFILE opened for ODBC access. This instruction does not provide information if not using ODBC. When using other database engines using ADO, MYSQL, or SQLite drivers, specialized SQL instructions retrieve the database details.
For example, the following SQL table retrieves system table information for MySQL:
See this link for MySQL 5.7 Documentation: http://dev.mysql.com/doc/refman/5.7/en/information-schema.html
See Also: GETSTRING, System Interface Instructions
![]() |