The problem is here
date = DateTime.Now.ToString();
for debugging purpose change this line to this
date = '01-Jan-2016';
and re-execute the code, you will see that it gets successfully executed and a row has been added in the message table.
Now its your task to understand what is the difference between the previous and new changes :)