`
wangjie2013
  • 浏览: 173806 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Parameter index out of range (1 > number of parameters, which is 0).

    博客分类:
  • Bug
阅读更多

 

 

    ExceptionParameter index out of range (1 > number of parameters, which is 0).

 

    在使用jdbc是出现这个错误,原因是在使用占位符(?)的时候,用单引号括起来了,这个问题在拼接复杂sql语句的时候常常出现。

 

    错误:SELECT * FROM doctor WHERE docName = '?'

    正确:SELECT * FROM doctor WHERE docName = ?

分享到:
评论

相关推荐

    MySQL 数据库 like 语句通配符模糊查询小结

    MySQL 报错:Parameter index out of range (1 > number of parameters, which is 0)——MySQL 数据库 like 语句通配符模糊查询小结 前言 今天在使用MySQL语句执行增删改查操作时,控制台报出了以下错误:Parameter...

    Mabatis错误提示Parameter index out of range的处理方法

    在上面的示例中,错误信息显示为"Parameter index out of range (1 > number of parameters, which is 0)",这表明参数索引超出了范围。解决方法是检查参数索引,确保参数索引从1开始。 Parameter index out of ...

    Handbook of Research on Soft Computing and Nature-Inspired Algorithms

    Featuring comprehensive coverage on a range of topics and perspectives such as swarm intelligence, speech recognition, and electromagnetic problem solving, this publication is ideally designed for ...

    BobBuilder_app

    In this version I have done away with the b+tree and hash index in favor of my own MGIndex structure which for all intents and purposes is superior and the performance numbers speak for themselves....

    错误总结.doc

    1. **javax.servlet.ServletException: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0)**:这个错误通常发生在SQL查询中,当你尝试绑定一个参数,但实际的参数列表为...

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    index (counted from the first index instead of the first list item). - FIX: In THistory.DeleteActions added validation of FActionIndex (FActionIndex could appear beyond the list boundaries). Thanks ...

    apktool documentation

    // pkgId of framework-res.apk determines number (which is 0x01) $ apktool if com.htc.resources.apk I: Framework installed to: 2.apk // pkgId of com.htc.resources is 0x02 $ apktool if ...

    数位板压力测试

    Out of Bounds Tracking 61 OBT Programming 61 Information Category 61 Turning OBT On and Off 61 B.3. Function Keys 62 FKEYS Programming 62 Information Category 62 B.4. Tilt 62 TILT Programming 63 ...

    WPTools.v6.29.1.Pro

    + There is an overloaded LoadFromString which expects a WideString as parameter (Delphi 6+) - The Setup named the Delphi 2009 files "Delphi 2005" due to a typo. (Delphi 2005 units are not included any...

    二级减速器课程设计说明书reducer design specification.doc

    2, the transmission ratio range of the expanded two-stage gear reducer ia=8 ~ 40, the transmission ratio range of v-belt transmission is ib=2~4, so the theoretical transmission ratio range is=16~160....

    i-vector的工具箱

    As expected there is no change in overall shape of the distribution, and only the dynamic range of the feature stream is modified. wcmvn Purpose Cepstral mean and variance normalization (CMVN) ...

    php.ini-development

    The syntax of the file is extremely simple. Whitespace and lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored,...

    BURNINTEST--硬件检测工具

    number of Network Addresses specified in Preferences->Network will be the number of NICs tested. This will error faulty NICs that are not detected by the BurnInTest auto NIC detection mechanism. ...

    servlet2.4doc

    Called by the servlet container to indicate to a servlet that the servlet is being taken out of service. destroy() - Method in class javax.servlet.GenericServlet Called by the servlet container to ...

    Ulam’s searching game with.pdf

    The analysis is based on a generalized version of the game, where the single parameter \( n \) is replaced by a sequence of non-negative integers \( x_0, x_1, \ldots, x_k \). These sequences ...

    occam一维反演

    tobt = 1000.0 ifftol = 0 call itrout (itform,descr,modfil,datfil,maxitr,tolreq, * iruf,nit,pmu,rlast,tobt,ifftol,iof2) end if c c zero out the model prejudice and weights in case inputm() and ...

    S7A驱动720版本

    logical name of the driver device, which is requested, must be entered . Example: "!switch:D11" delivers the state of the driver device with the name "D11". This function is also available via ...

    微软内部资料-SQL性能优化2

    A stack is an area of memory in which program procedure or function call addresses and parameters are temporarily stored. In Process To run in the same address space. In-process servers are loaded ...

    VclZip pro v3.10.1

    - By defining ZLIB121, VCLZip will use the latest version of ZLib which is included with the registered version. Some optimization improvements which should show some improvement in zipping and ...

Global site tag (gtag.js) - Google Analytics