月末了,把这几天写Android项目遇到的问题和学到的一些东西总结下,后台的数据请求传递是通过servlet来实现的。在解决完上一个java.sql.SQLException后,又遇到了下面的问题:
Duplicate key or integrity constraint violation message from server: "Column 'CourlerTitle' cannot be null"
百度之后给出的原因都是:相关数据库表,添加了索引唯一约束或外键关联
解决:
删除唯一索引
alter table t_courler drop index t_courler_ibfk_1; //t_courler_ibfk_1索引名
删除外键
ALTER TABLE t_courler DROP FOREIGN KEY t_courler_ibfk_1;

本文总结了解决Android项目中出现的数据库错误“Column 'CourlerTitle' cannot be null”的过程,包括删除唯一索引和外键的方法。
1690

被折叠的 条评论
为什么被折叠?



