Domino & Notes error

Overflow

LotusScript error 6.

What it means

A value is too large (or too small) for the data type of the variable it is being stored in.

Common causes

  • Storing a value above 32,767 in an Integer variable, for example a document count or loop counter
  • Converting a large number with CInt instead of CLng
  • A calculation result exceeding the range of the declared type

Quick fixes

  1. Declare counters and totals as Long (or Double) instead of Integer
  2. Use CLng or CDbl instead of CInt for large values
  3. Check the line in the debugger to see which variable overflowed

Need a hand with this?

Paste your exact message into What's That Error? for a plain-English explanation, or get in touch. I've been supporting Domino and Notes for 28 years.

Disclaimer

The errors, causes and fixes on this site are carefully researched, drawing on HCL documentation and 28 years of hands-on Domino and Notes experience. Every environment is different, though, and a solution that works in one may not be right for yours. Exact wording can also vary between Domino and Notes versions.

This information is general guidance only and is provided without warranty of any kind. Always back up your data and test changes on a non-production system first. To the extent permitted by law, Bruinsma Services Pty Ltd accepts no responsibility or liability for any loss, damage, downtime or other consequence arising from use of this information. For advice specific to your environment, please contact me.