How did David win over prisoners?

I couldn't find any specific references or anecdotes about someone named David winning over prisoners in the content that is available to me. If you could provide more context or specify which David you are referring to, I might be able to assist you better.