Error 146: Too many variables Storage size of all variables exceeded the capacity of the data segment. Variables and typed constants are stored in the data segment along with program data. The data segment may not exceed 64K. Use dynamic allocation (New or GetMem) to place data on the heap.