当前位置:网站首页>L'index des paramètres d'erreur est sorti de la plage pour les requêtes floues (1 > Nombre de paramètres, qui est 0)
L'index des paramètres d'erreur est sorti de la plage pour les requêtes floues (1 > Nombre de paramètres, qui est 0)
2022-07-03 02:57:00 【Un iris rhamnoides CD】
Voici les informations d'erreur
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)
Erreurs possibles dans les assignations précompilées :
- Mauvaise position d'affectation spécifiée ,C'est - à - dire:
parameterIndex
Erreur de paramètre, La valeur de ce paramètre est de 1C'est parti.- Nombre insuffisant d'affectations
En promettantsqlL'instruction n'a pas d'erreur, Et sans erreur lors de l'utilisation d'une affectation précompilée :
…
Ça pourrait êtresql L'épissage des caractères utilisé dans l'instruction est incorrect ,C'est comme ça que ça se passe, L'exception décrite ci - dessus s'est produite au début avec des guillemets simples .
Solutions:
Changementsql L'épissage des déclarations , C'est une petite compilation.select * from user where uid like concat('%',?,'%')
边栏推荐
- Source code analysis | resource loading resources
- [principles of multithreading and high concurrency: 1_cpu multi-level cache model]
- random shuffle注意
- Add some hard dishes to the interview: how to improve throughput and timeliness in delayed task scenarios!
- Super easy to use logzero
- Classes and objects - initialization and cleanup of objects - constructor call rules
- 【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
- [Fuhan 6630 encodes and stores videos, and uses RTSP server and timestamp synchronization to realize VLC viewing videos]
- [principles of multithreading and high concurrency: 1_cpu multi-level cache model]
- Source code analysis | layout file loading process
猜你喜欢
"Analysis of 43 cases of MATLAB neural network": Chapter 43 efficient programming skills of neural network -- Discussion Based on the characteristics of the new version of MATLAB r2012b
sql server数据库添加 mdf数据库文件,遇到的报错
Do you really understand relays?
【Flutter】shared_ Preferences local storage (introduction | install the shared_preferences plug-in | use the shared_preferences process)
C language beginner level - pointer explanation - paoding jieniu chapter
The Linux server needs to install the agent software EPS (agent) database
random shuffle注意
What does "where 1=1" mean
力扣------网格中的最小路径代价
你真的懂继电器吗?
随机推荐
Kubernetes family container housekeeper pod online Q & A?
Random Shuffle attention
[fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)
Why choose a frame? What frame to choose
Can netstat still play like this?
Tensorflow to pytorch notes; tf. gather_ Nd (x, y) to pytorch
处理数据集,使用LabelEncoder将所有id转换为从0开始
Distributed transaction
Didi programmers are despised by relatives: an annual salary of 800000 is not as good as two teachers
Serious security vulnerabilities reported by moxa mxview network management software
Xiaodi notes
【富瀚6630编码存录像,用rtsp服务器及时间戳同步实现vlc观看录像】
Sous - système I2C (IV): débogage I2C
[principles of multithreading and high concurrency: 1_cpu multi-level cache model]
How to select the minimum and maximum values of columns in the data table- How to select min and max values of a column in a datatable?
Strategy application of Dameng database
What does "where 1=1" mean
SQL server queries the table structure of the specified table
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc
Introduction to cron expression