A column insert or update conflicts with a rule imposed by a previous CREATE RULE statement

风流意气都作罢 提交于 2019-12-02 01:08:18

问题


I'm working on a online game. I got some problems with inserting new data to table. I'm getting

2010-4-8 2:14, 37000, 513, [Microsoft][ODBC SQL Server Driver][SQL Server]A column insert or update conflicts with a rule imposed by a previous CREATE RULE statement. The statement was terminated. The conflict occurred in database 'KN_online', table 'ACCOUNT_CHAR', column 'strAccountID'., 261 NationSelect

in logs. What does this means? How can i fix this?

I've tried to delete RULE for my DB but I'm unable to delete RULE. I'm getting the rule 'dbo.unallowedchars' cannot be dropped because it is bounded to one or more clumn.

I set all permissions right but its still not working.. thanks..


回答1:


You'd want to:

a) Understand why someone bound the rule in the first place. If you don't know why the rule is there, I'd suggest a bit of investigation before proceeding. Are you going to break some other area of the application by putting in inappropriate characters?

b) Use the stored procedure sp_unbindrule (2008 link, but applies to 2000 equally well), to unbind the rule from the column.



来源:https://stackoverflow.com/questions/2599005/a-column-insert-or-update-conflicts-with-a-rule-imposed-by-a-previous-create-rul

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!