<small id='6ilFG'></small><noframes id='6ilFG'>

        <bdo id='6ilFG'></bdo><ul id='6ilFG'></ul>

    1. <legend id='6ilFG'><style id='6ilFG'><dir id='6ilFG'><q id='6ilFG'></q></dir></style></legend>

      1. <i id='6ilFG'><tr id='6ilFG'><dt id='6ilFG'><q id='6ilFG'><span id='6ilFG'><b id='6ilFG'><form id='6ilFG'><ins id='6ilFG'></ins><ul id='6ilFG'></ul><sub id='6ilFG'></sub></form><legend id='6ilFG'></legend><bdo id='6ilFG'><pre id='6ilFG'><center id='6ilFG'></center></pre></bdo></b><th id='6ilFG'></th></span></q></dt></tr></i><div id='6ilFG'><tfoot id='6ilFG'></tfoot><dl id='6ilFG'><fieldset id='6ilFG'></fieldset></dl></div>

      2. <tfoot id='6ilFG'></tfoot>

        绑定参数太多.提供了 5 个参数,但语句需要 4 个参数

        Too many bind arguments. 5 arguments were provided but the statement needs 4 arguments(绑定参数太多.提供了 5 个参数,但语句需要 4 个参数)

              <tbody id='Y7xl2'></tbody>

              <bdo id='Y7xl2'></bdo><ul id='Y7xl2'></ul>

              <small id='Y7xl2'></small><noframes id='Y7xl2'>

              • <legend id='Y7xl2'><style id='Y7xl2'><dir id='Y7xl2'><q id='Y7xl2'></q></dir></style></legend>

              • <i id='Y7xl2'><tr id='Y7xl2'><dt id='Y7xl2'><q id='Y7xl2'><span id='Y7xl2'><b id='Y7xl2'><form id='Y7xl2'><ins id='Y7xl2'></ins><ul id='Y7xl2'></ul><sub id='Y7xl2'></sub></form><legend id='Y7xl2'></legend><bdo id='Y7xl2'><pre id='Y7xl2'><center id='Y7xl2'></center></pre></bdo></b><th id='Y7xl2'></th></span></q></dt></tr></i><div id='Y7xl2'><tfoot id='Y7xl2'></tfoot><dl id='Y7xl2'><fieldset id='Y7xl2'></fieldset></dl></div>
                <tfoot id='Y7xl2'></tfoot>
                  本文介绍了绑定参数太多.提供了 5 个参数,但语句需要 4 个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  执行下面的函数时,我得到了上面的 IllegalArgumentException.我没有得到的是,当我运行调试器时,values 变量显然只包含 4 个参数,因为它应该.

                  I get the IllegalArgumentException above when executing the function below. What I don't get is that when I run the debugger, the values variable clearly only contains 4 arguments, as it should.

                  所以……

                  (1) 这个神秘的第五个论点从何而来?

                  (1) Where does this mysterious fifth argument come from?

                  (2) 我应该如何找到这个错误?

                  (2) How should I approach finding this error?

                  db.update(
                      UppdragEntry.TABLE_NAME,
                      values,
                      selection,
                      selectionArgs);
                  

                  推荐答案

                  Selection 包含以下内容: String selection = "_id";String[] selectionArgs = {" =" + personId};

                  Selection contains the following: String selection = "_id"; String[] selectionArgs = {" =" + personId};

                  您在 selectionArgs 中有一个值,但在 selection 中没有 ? 占位符.

                  You have a value in selectionArgs but no ? placeholder for it in selection.

                  改成

                  String selection = "_id = ?";
                  String[] selectionArgs = { "" + personId };
                  

                  该方法构建一个 SQL 字符串.提供的 ContentValues 构建为 ? 占位符和绑定参数.额外的选择参数也作为绑定参数提供,它们必须与相同数量的 ? 占位符匹配.

                  The method builds an SQL string. Supplied ContentValues are built as ? placeholder and bind arguments. Additional selection args are also provided as bind arguments and they must be matched with equal number of ? placeholders.

                  这篇关于绑定参数太多.提供了 5 个参数,但语句需要 4 个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Slf4j LoggerFactory.getLogger and sonarqube(Slf4j LoggerFactory.getLogger 和 sonarqube)
                  Security - Array is stored directly(安全性 - 数组直接存储)
                  SonarQube quot;Class Not Foundquot; during Main AST Scan(SonarQube“找不到类在主 AST 扫描期间)
                  Integrate Spock#39;s test with Sonar(将 Spock 的测试与声纳集成)
                  How do I make Hudson/Jenkins fail if Sonar thresholds are breached?(如果违反声纳阈值,我如何让 Hudson/Jenkins 失败?)
                  automatically add curly brackets to all if/else/for/while etc. in a java code-base(自动将大括号添加到 java 代码库中的所有 if/else/for/while 等)

                    <bdo id='Ko9hX'></bdo><ul id='Ko9hX'></ul>
                  • <legend id='Ko9hX'><style id='Ko9hX'><dir id='Ko9hX'><q id='Ko9hX'></q></dir></style></legend>

                      <tfoot id='Ko9hX'></tfoot>
                      1. <small id='Ko9hX'></small><noframes id='Ko9hX'>

                        <i id='Ko9hX'><tr id='Ko9hX'><dt id='Ko9hX'><q id='Ko9hX'><span id='Ko9hX'><b id='Ko9hX'><form id='Ko9hX'><ins id='Ko9hX'></ins><ul id='Ko9hX'></ul><sub id='Ko9hX'></sub></form><legend id='Ko9hX'></legend><bdo id='Ko9hX'><pre id='Ko9hX'><center id='Ko9hX'></center></pre></bdo></b><th id='Ko9hX'></th></span></q></dt></tr></i><div id='Ko9hX'><tfoot id='Ko9hX'></tfoot><dl id='Ko9hX'><fieldset id='Ko9hX'></fieldset></dl></div>
                          <tbody id='Ko9hX'></tbody>