Creating your script

Create your LotusScript program. Your script may be embedded in a form, or defined as a standalone agent.

Access the LS:DO Classes

To access the LS:DO classes in your script, you must put the following statement in the (Options) event of the (Global) object or the agent:

UseLSX "*LSXODBC"

This statement makes the ODBC classes available in the programming environment, including the browser. If you do not use this statement, scripts with ODBC classes do not compile. The asterisk causes the LSX file to be determined by a search of the registry, initialization file, or preference file. The asterisk is more flexible than a platform-dependent file name.

The LSXODBC.LSS file, which defines the constants used by the LS:DO classes, is not supplied with Notes. Instead, those constants are defined when the UseLSX statement executes.

Decide where your script will execute

Once you have completed your LotusScript program, configure it to execute on either the Notes client or the Domino server.

Client-based

The LotusScript program is stored and executes on the Notes client (workstation):

  • Requirements: The LotusScript program and all ODBC drivers used by it must be installed on each Notes client that will run the program.
  • Advantages: The program can be designed with more control over timing and resource use.
  • Disadvantages: If the program requires updates, it must be updated on each workstation. You can only run one agent at a time on the Notes client, which means an application involving multiple agents may take longer to run.

Server-based

The LotusScript program is stored and executes on a Domino server:

  • Requirements: The LotusScript program and all ODBC drivers used by it must be installed on a Domino server.
  • Advantages: If the program requires updates, only the single server copy has to be updated. The Notes server supports multi-threading, so multiple instances of agents can be run at one time, and resources will be shared.
  • Disadvantages: The user cannot run it from the Notes client. The program's timing can't be as precise as for a client-based configuration because the program competes with other server-based agents for resources.

Run on server

The LotusScript program is stored and executed on a Domino server, but a user can start it from a Notes client.

  • Requirements: The LotusScript program and all ODBC drivers used by it must be installed on a Notes server.
  • Advantages: A user can run it from the Notes client, instead of requiring access to a server. If the program requires updates, only the single server copy has to be updated. The Notes server supports multi-threading, so multiple instances of agents can be run at one time, and resources will be shared.
  • Disadvantages: The program is server-based, so its timing can't be as precise as for the client-based configuration because the program competes with other server-based agents for resources.