From 248d6a76f49d35a96259eea18b3d5a9709b95942 Mon Sep 17 00:00:00 2001 From: niudongyao Date: Mon, 9 Jan 2023 06:19:24 +0000 Subject: [PATCH] change rdb import Signed-off-by: niudongyao --- .../apis/js-apis-application-dataShareExtensionAbility.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-dataShareExtensionAbility.md b/zh-cn/application-dev/reference/apis/js-apis-application-dataShareExtensionAbility.md index 74cdd96447..02bc95bc21 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-application-dataShareExtensionAbility.md +++ b/zh-cn/application-dev/reference/apis/js-apis-application-dataShareExtensionAbility.md @@ -63,7 +63,7 @@ DataShare客户端连接DataShareExtensionAbility服务端时,服务端回调 **示例:** ```ts -import rdb from '@ohos.data.rdb'; +import rdb from '@ohos.data.relationalStore'; let DB_NAME = "DB00.db"; let TBL_NAME = "TBL00"; @@ -76,7 +76,7 @@ export default class DataShareExtAbility extends DataShareExtensionAbility { onCreate(want, callback) { rdb.getRdbStore(this.context, { name: DB_NAME - }, 1, function (err, data) { + }, function (err, data) { console.log('getRdbStore done, data : ' + data); rdbStore = data; rdbStore.executeSql(DDL_TBL_CREATE, [], function (err) { -- GitLab