简体   繁体   English

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

[英]how to load more than 1 MB data from sqlite db to android cursor?

exactly i am trying to load more than 1MB of data from sqlite database to android cursor. 我正在尝试从sqlite数据库加载超过1MB的数据到android游标。 At the time of loading it gives following error like 在加载时它会出现以下错误

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.

if any one knows how to load large data (more than 1MB) to android cursor? 如果有人知道如何加载大型数据(超过1MB)到Android游标? thanks, 谢谢,

Don't store blobs of 500KB in your database. 不要在数据库中存储500KB的blob。 Store identifiers in your database and put the blobs as files onto the storage. 将标识符存储在数据库中,并将blob作为文件放入存储中。 If you use MODE_PRIVATE, they will not be accessible by other processes. 如果使用MODE_PRIVATE,则其他进程将无法访问它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM