During the mid 1800's patronymics were used more frequently than actual surnames as we know them today as heritable family names. Patronymics are a combination of a person's father's first name and the ending "sen" (son) or "datter" (daughter). For instance if Peter's father's name was Hans, Peter would go under the name Peter Hansen, and Hans's daughter Anna would be called Anna Hansdatter. In this way people would know that Peter and Anna were Hans' son and daughter.
The abolishment of patronymics
Patronymics were outlawed in the 1820's since the government wanted people to use family surnames instead. When using patronymics, only one generation would have the same last name, and the government wanted to change that. However, it took more than 50 years until the use of patronymics were abolished completely. This means that it can be hard to figure our if your Danish ancestors born in that period of time used patronymics or if they had switched to a family surnames. That is, of course only if you know the name of that person's father.