Update and rename writetodatabase to writetodatabase1