## What if I failed to clear a table in an RDB store using TRUNCATE TABLE?
Applicable to: OpenHarmony SDK 3.2.9.2 (API version 9)
**Symptom**
An error is reported when the **TRUNCATE TABLE** statement is used to clear table data.
**Solution**
The RDB store uses SQLite and does not support the **TRUNCATE TABLE** statement. To clear a table in an RDB store, use the **DELETE** statement, for example, **DELETE FROM sqlite\_sequence WHERE name = 'table\_name'**.
## What data types does an RDB store support?
Applicable to: OpenHarmony SDK 3.0 or later, API version 9 stage model
**Solution**
An RDB store supports data of the number, string, and Boolean types. The number type supports data of the Double, Long, Float, Int, or Int64 type, with a maximum precision of 17 decimal digits.
## How do I save pixel map data to a database?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
**Symptom**
Pixel map data fails to be stored.
**Solution**
Convert the pixel map data into an **ArrayBuffer** and save the **ArrayBuffer** to your database.
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
**Solution**
The RDB store files are stored in **/data/app/el2/100/database/*Bundle_name*/entry/rdb/**. You can use the hdc command to copy the file from the directory and use a SQLite tool to open the file.
## Do the OpenHarmony databases have a lock mechanism?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
**Solution**
The distributed data service (DDS), RDB store, and preferences provided OpenHarmony have a lock mechanism. You do not need to bother with the lock mechanism during the development.
## What if I failed to use get() to obtain the data saved by @ohos.data.storage put()?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
**Symptom**
After @ohos.data.storage **put()** is called to save data, **get()** is called to obtain the data. However, the data fails to be obtained.
**Solution**
The **put()** method provided by **@ohos.data.storage** saves data in the memory. When the application exits, the data in the memory will be cleared. If you want to persist the data, you need to call **flush()** or **flushSync()** after **put()**. After data is persisted, you can use **get()** to obtain the data after the application is restarted.
## What if a large text file fails to be saved in an RDB store?
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
**Symptom**
In API version 8, large text files cannot be saved in RDB stores.
**Solution**
In versions earlier than API version 9, the maximum length of a text file is 1024 bytes. If the text file exceeds 1024 bytes, it cannot be saved.
The limit on the text file size has been removed since API9 version.
## How do I obtain the path of system screenshots?
Applicable to: OpenHarmony SDK 3.2.6.3, stage model of API version 9
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
Yes. **fileio.rmdir** deletes files recursively.
**Solution**
## How Do I Create a File That Does Not Exist?
The screenshots are stored in **/storage/media/100/local/files/Pictures/Screenshots/**.
Applicable to: OpenHarmony SDK 3.2.6.3, stage model of API version 9
## How do I change the permissions on a directory to read/write on a device?
You can use **fileio.open(filePath, 0o100, 0o666)**. The second parameter **0o100** means to create a file if it does not exist. The third parameter **mode** must also be specified.
Applicable to: OpenHarmony 3.2 Beta 5 (API version 9)
## What If "call fail callback fail, code: 202, data: json arguments illegal" Is Displayed?
**Symptom**
Applicable to: OpenHarmony SDK 3.2.6.3, stage model of API version 9
When the hdc command is used to send a file to a device, "permission denied" is displayed.
When the **fileio** module is used to copy files, the file path cannot start with "file:///".
**Solution**
## How Do I Read Files Outside the App Sandbox?
Applicable to: OpenHarmony SDK 3.2.6.5, stage model of API version 9
If the input parameter of the **fileio** API is **path**, only the sandbox directory of the current app obtained from the context can be accessed. To access data in other directories such as the user data, images, and videos, open the file as the data owner and operate with the file descriptor (FD) returned.
For example, to read or write a file in Media Library, perform the following steps:
1. Use **getFileAssets()** to obtain the **fileAsset** object.
2. Use **fileAsset.open()** to obtain the FD.
3. Use the obtained FD as the **fileIo** API parameter to read and write the file.
## What If the File Contains Garbled Characters?
Applicable to: OpenHarmony SDK 3.2.5.5, stage model of API version 9
Read the file content from the buffer, and decode the file content using **util.TextDecoder**.
## What Should I Do If There Is No Return Value or Error Captured After getAlbums Is Called?
Applicable to: OpenHarmony SDK 3.2.5.3, stage model of API version 9
The **ohos.permission.READ_MEDIA** is required for using **getAlbums()**. In addition, this permission needs user authorization. For details, see [OpenHarmony Permission List](../security/permission-list.md).
1. Configure the required permission in the **module.json5** file.
```
"requestPermissions": [
{
"name": "ohos.permission.READ_MEDIA"
}
]
```
2. Add the code for user authorization before the **MainAbility.ts -> onWindowStageCreate** page is loaded.
```
import abilityAccessCtrl from '@ohos.abilityAccessCtrl.d.ts';
private requestPermissions() {
let permissionList: Array<string> = [
"ohos.permission.READ_MEDIA"
];
let atManager = abilityAccessCtrl.createAtManager();
encryptOptions.inData = aesCipherStringToUint8Array(cipherInData.slice (64,80)); // Remaining data
```
## What if garbled characters are returned by **digest()** of **Md** in Crypto framework?
Applicable to: OpenHarmony 3.1 Beta 5 (API version 9)
**Symptom**
In the CryptoFramework, garbled characters are returned by **digest()** of **Md**.
**Solution**
The DataBlob returned by **digest()** is of the Uint8Array type and needs to be converted into a hexadecimal string before being printed. You can use the online MD5 encryption tool to verify the result.