简体   繁体   中英

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. 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? thanks,

Don't store blobs of 500KB in your database. Store identifiers in your database and put the blobs as files onto the storage. If you use MODE_PRIVATE, they will not be accessible by other processes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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