Home > Database > Mysql Tutorial > body text

操作SQLite数据库报错:“绑定或列的索引超出范围”

WBOY
Release: 2016-06-07 17:11:20
Original
1677 people have browsed it

操作SQLite数据库报错:ldquo;绑定或列的索引超出范围rdquo;

Html代码

LogCat 报错信息:

Java代码

发生错误原因分析:
此处at com.tmall.nokia.db.RecordDBHelper.query(RecordDBHelper.java:50)出现问题:

Java代码

  • 按照错误Log提示,,继续查找出错位置,发现传入参数where和args数组长度不一致。因此报错“android.database.sqlite.SQLiteException: bind or column index out of range”(绑定或列的索引超出范围)。

    解决办法:
    找到出错原因后,修改传入参数,保证传入参数where 与args长度一致。

    linux

  • Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!