Before the line:
$InsertQuery->execute();
add this:
$insertQuery->Debug = true;
That will give you a better error message.... most likely you have a field in your database that doesn't allow NULL and doesn't have a default value so it won't let you insert a record without specifying a value for that field. The error message should tell you what field that is after you add the debug line.