如何加载从sqlite的分贝超过1 MB的数据到Android光标? [英] how to load more than 1 MB data from sqlite db to android cursor?

查看:126
本文介绍了如何加载从sqlite的分贝超过1 MB的数据到Android光标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正是我努力不是从SQLite数据库到Android光标1MB的数据加载更多。在装载时它给下面的错误,如

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.

如果任何人知道如何加载大量数据(超过1MB)到Android光标? 谢谢,

if any one knows how to load large data (more than 1MB) to android cursor? thanks,

推荐答案

不要存储500KB的斑点在你的数据库。在数据库中存储的标识符,并把斑点的文件到存储。如果你使用MODE_PRIVATE,他们不会被其它进程访问。

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.

这篇关于如何加载从sqlite的分贝超过1 MB的数据到Android光标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆