The SQL insert had a wrong database prefix  

It should use the database connection default one.