当前位置:网站首页>Parameter index out of range (1 > number of parameters, which is 0)
Parameter index out of range (1 > number of parameters, which is 0)
2022-07-03 02:57:00 【A stream kite CD】
Here is the error message
select * from user where uid like '%?%'
java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926)
at com.mysql.jdbc.PreparedStatement.checkBounds(PreparedStatement.java:3288)
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3272)
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:3314)
at com.mysql.jdbc.PreparedStatement.setInt(PreparedStatement.java:3258)
at com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:3533)
Possible errors in precompiled assignment :
- The specified assignment position is wrong , namely
parameterIndexParameter error , The value of this parameter is from 1 Start- The number of assignments is not enough
Guarantee sql There is no mistake in the statement , And use precompiled assignment without error :
…
It could be sql The character splicing method used in the statement is incorrect , This is what Xiaobian is like , The above-mentioned exception occurs when using single quotation marks at the beginning .
resolvent :
change sql The splicing of statements , Xiaobian changed toselect * from user where uid like concat('%',?,'%')
边栏推荐
- js根据树结构查找某个节点的下面的所有父节点或者子节点
- C语言初阶-指针详解-庖丁解牛篇
- 用docker 连接mysql的过程
- Kubernetes cluster log and efk architecture log scheme
- Segmentation fault occurs during VFORK execution
- HTB-Devel
- What is the way out for children from poor families?
- Three.js本地环境搭建
- Andwhere multiple or query ORM conditions in yii2
- Add MDF database file to SQL Server database, and the error is reported
猜你喜欢

Error invalid bound statement (not found): com ruoyi. stock. mapper. StockDetailMapper. XXXX solution

Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)

vfork执行时出现Segmentation fault

Yiwen takes you to know ZigBee
![[shutter] monitor the transparency gradient of the scrolling action control component (remove the blank of the top status bar | frame layout component | transparency component | monitor the scrolling](/img/c3/b9a614001f80345a5c1cb3c68ab27c.jpg)
[shutter] monitor the transparency gradient of the scrolling action control component (remove the blank of the top status bar | frame layout component | transparency component | monitor the scrolling

Random shuffle note

Sqlserver row to column pivot

Can netstat still play like this?

Left connection, inner connection

Super easy to use logzero
随机推荐
Left connection, inner connection
Pytest (6) -fixture (Firmware)
Change cell color in Excel using C - cell color changing in Excel using C
TCP 三次握手和四次挥手机制,TCP为什么要三次握手和四次挥手,TCP 连接建立失败处理机制
Serious security vulnerabilities reported by moxa mxview network management software
sql server 查詢指定錶的錶結構
Practice of traffic recording and playback in vivo
[hcia]no.15 communication between VLANs
Use optimization | points that can be optimized in recyclerview
Deep Reinforcement Learning for Intelligent Transportation Systems: A Survey 论文阅读笔记
Joking about Domain Driven Design (III) -- Dilemma
Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)
I2C 子系统(四):I2C debug
Pytest (6) -fixture (Firmware)
Three. JS local environment setup
SqlServer行转列PIVOT
C语言初阶-指针详解-庖丁解牛篇
分布式事务
Global and Chinese ammonium dimolybdate market in-depth analysis and prospect risk prediction report 2022 Edition
Andwhere multiple or query ORM conditions in yii2