Access database when device is offline