Yes, inserting a couple of single quotes into the generated stringaround the ClientID did the trick.Many thanks to all for your assistance.