The local Picard group at a generic point of the one-dimensional Baily-Bore
l boundary of a Hermitean symmetric quotient of type O(2,n) is computed. Th
e main ingredient is a local version of Borcherds' automorphic products. Th
e local obstructions for a Heegner divisor to be principal are given by cer
tain theta series with harmonic coefficients. Sometimes they generate Borch
erds' space of global obstructions. In these particular cases we obtain a s
imple proof of a result due to the first author: Suppose that Gamma subset
of O(2,n) is the orthogonal group attached to an even unimodular lattice. T
hen every meromorphic modular form for Gamma, whose zeros and poles lie on
Heegner divisors, is given by a Borcherds product.