Select database before commit takes place to ensure register is selected