update sm_opendb() sm_closedb()