java - java.sql.SQLException:不正确的整数值:第 1 行的列“IdentCat”的“Guitare”
问题描述
这是我输入请求插入时的错误消息。我的数据库 IdentApp(主键)中有 4 列 | IdentCat、IdentM、IdentLocax
java.sql.SQLException:不正确的整数值:第 1 行的列 'IdentCat' 的'Guitare'Requete:插入 collabo(IdentCat、IdentEtat、IdentLoc)值('Guitare'、'Mercier'、'AAAAA1')
public boolean insertAppareil(Appareil app)
{
boolean ok = ConnexionMySQL.getInstance().actionQuery("Insert into collabo (IdentCat, IdentEtat, IdentLoc) values ('" + app.getCatApp().getNomI() + "','" + app.getEtatApp().getNomM() + "','" + app.getLocApp() +
"'" + ")");
return ok;
}
解决方案
推荐阅读
- buildfire - Buildfire - 我可以将用户路径发送到应用程序本身之外的应用程序吗?
- django - Django:如何将链接添加到我的管理站点
- vb6 - 如何根据父节点属性更新 TreeView 子节点
- watchkit - GeometryReader 没有生成正确的屏幕高度?
- rust - 是否可以围绕 &mut 创建一个包装器,其作用类似于 &mut
- java - reverse 方法应该反向打印出 lst 。它改为打印一个空的arrayList。为什么会发生这种情况,我该如何解决?
- c# - 将用户添加到 Slack 频道
- flutter - Flutter:如何在 Firestore 中获取我的数组数据?
- python - 烧瓶应用程序 - 100% 的内存和 CPU 消耗
- java - Java异常错误导致代码突然停止