Writing formulas and scripts to access relational databases

The following @functions access an external database through ODBC and return a value or list of values:

  • @DbColumn returns all the values in one column of a table, or all the distinct values.
  • @DbLookup returns selected values in one column of a table by matching keys.
  • @DbCommand passes a command to an external DBMS and returns the result.

@DbColumn and @DbLookup can only retrieve data. They can't add, delete, or modify data, or perform other operations. @DbCommand can retrieve data or send other SQL statements that can change data. LotusScript® provides a wider range of capabilities including the ability to update the external database.

The LotusScript® Data Object (LS:DO)

This LSX-compliant module allows you to use LotusScript® to write applications that incorporate data from external non-Notes data sources. Your script may perform the following steps:

  • Establish a connection with the data source.

    Each connection requires the data source name. If the data source name is not already registered, you must also provide additional information.

  • Use SQL statements to send queries or other actions to the data source.
  • Retrieve and use result sets.
  • Read, modify, or add information into relational databases.
  • Disconnect from the data source.

For more information on writing scripts to access external databases, see the topic "Accessing external databases through LS:DO" on the Notes® Domino® Application development wiki at http://www-10.lotus.com/ldd/ddwiki.nsf.