LibreOffice LibreOffice 25.8 SDK API Reference

Public Member Functions | List of all members
XColumnLocate Interface Referencepublished

provides the possibility to find columns by their name. More...

`import"XColumnLocate.idl";`

Inheritance diagram for XColumnLocate:

## Public Member Functions
long | findColumn ([in]string columnName) raises (SQLException)
| maps the given ResultSet column name to its ResultSet column index. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

provides the possibility to find columns by their name.

When several columns have the same name, then the value of the first matching column will be returned. The column name option is designed to be used when column names are used in the SQL query. For columns that are NOT explicitly named in the query, it is best to use column numbers. If column names are used, there is no way for the programmer to guarantee that they actually refer to the intended columns.

## Member Function Documentation

## ◆ findColumn()

long findColumn | ( | [in] string | columnName | ) |
raises | ( | SQLException
| ) |  |

maps the given ResultSet column name to its ResultSet column index.

The specification before LibreOffice 4.2 left unspecified what should happen for an invalid column name. As a result some drivers written against the older specification may return a special invalid value, such as a negative number, zero, or a number greater than the number of columns.

Parameters

  columnName | the name of the column

Returns
  the position of the column

Exceptions

  SQLException | if the column named `columnName` does not exist, or a database access error occurs.

The documentation for this interface was generated from the following file:

- com/sun/star/sdbc/XColumnLocate.idl