Use these methods to execute an SQL statement against the database without the overhead of using
a TPSQLQuery object. It returns result set as a values
of field specified by number (aFieldNumber parameter) or by name (aFieldName parameter).
If aFieldNumber parameter is omitted, the function returns the values of the first field.
Parameters:
aSQL
A String value containing the statement to be executed.
aList
Object of TStrings class or it's descendant.
aFieldNumber
Field number to return its value by method. Fields are numbered from zero. If this parameter is
omitted it is assumed to be 0. This means that first field's value will be returned.
aFieldName
Field name to return its value by method.
Examples:
PSQLDatabase1.SelectStrings('SELECT attname FROM pg_attribute WHERE attrelid = ''test''::regclass', Memo1.Lines);
This example will populate Memo1 with rows names of 'test' table.