月末了,把这几天写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;