#鸿蒙学习大百科#FA模型下如何删除数据库?

FA模型下如何删除数据库?

HarmonyOS
2024-10-23 11:40:45
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
莫名瞄一眼
import featureAbility from '@ohos.ability.featureAbility';

let context = featureAbility.getContext();

relationalStore.deleteRdbStore(context, 'RdbTest.db', (err: BusinessError) => {
  if (err) {
    console.error(`Failed to delete RdbStore. Code:${err.code}, message:${err.message}`);
    return;
  }
  console.info('Succeeded in deleting RdbStore.');
});
分享
微博
QQ
微信
回复
2024-10-23 15:33:51
相关问题