gpt4 book ai didi

android - 如何将超过 1 MB 的数据从 sqlite db 加载到 android 游标?

转载 作者:IT王子 更新时间:2023-10-29 06:22:44 27 4
gpt4 key购买 nike

确切地说,我正在尝试将超过 1MB 的数据从 sqlite 数据库加载到 android 游标。在加载时它会给出如下错误

08-04 11:10:15.813: ERROR/CursorWindow(4465): need to grow: mSize = 2097152, size = 403719, freeSpace() = 209669, numRows = 1
08-04 11:10:15.813: ERROR/CursorWindow(4465): Attempting to grow window beyond max size (2097152)
08-04 11:10:15.813: ERROR/Cursor(4465): Failed allocating 403719 bytes for blob at 0,13
08-04 11:10:15.813: DEBUG/Cursor(4465): finish_program_and_get_row_count row 0
08-04 11:10:15.899: ERROR/CursorWindow(4465): need to grow: mSize = 2097152, size = 403719, freeSpace() = 209669, numRows = 1
08-04 11:10:15.899: ERROR/CursorWindow(4465): Attempting to grow window beyond max size (2097152)
08-04 11:10:15.899: ERROR/Cursor(4465): Failed allocating 403719 bytes for blob at 0,13
08-04 11:10:15.899: DEBUG/Cursor(4465): finish_program_and_get_row_count row 0
08-04 11:10:15.899: ERROR/CursorWindow(4465): Bad request for field slot 0,0. numRows = 0, numColumns = 14
08-04 11:10:15.899: DEBUG/AndroidRuntime(4465): Shutting down VM.

是否有人知道如何将大数据(超过 1MB)加载到 android 游标?谢谢,

最佳答案

不要在数据库中存储 500KB 的 blob。将标识符存储在数据库中,并将 blob 作为文件放入存储中。如果您使用 MODE_PRIVATE,它们将无法被其他进程访问。

关于android - 如何将超过 1 MB 的数据从 sqlite db 加载到 android 游标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6938405/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com