"I prepared a sample project which demonstrates how you could modify the Dynamically Created Docks example so that it saves the state into Database. Please, take a look at the attached archive and let us know in case you still experience any problems.