我有一个问题,这不是问题.我的数据库有一些限制,如唯一名称(存储必须唯一的名称的列)插入或更新时,数据库将验证我们是否未覆盖某些名称,如果是,则返回可转换为SqlException的错误,代码为2627
I have a question, and it is not a problem. My database have some restrictions, as unique names (Column that stores the name of something that must be unique) When inserting or updating, the db verifies if we are not overriding some name, and if so, returns an error that is convertable to SqlException with code 2627
我的问题是...如果存在某些表格或我可以参考的东西以指示最终用户做什么?
My Question is... if exists some table or something that I can consult to indicate to the final user what to do?
在这种情况下..存在一个具有相同名称的用户....
In this case.. that exists a user with the same name....
推荐答案我认为,您应该看看SqlExceptions 错误属性,并查看错误编号,应将您指向master.dbo.sysmessages表中的消息.
I think, you should take a look at SqlExceptions Errors property and take a look at errors number which should point you to a message in master.dbo.sysmessages table.
更多推荐
SqlException错误代码
发布评论