且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检查sql表中是否存在Name

更新时间:2023-02-04 22:48:34

你没有正确标记你的问题。如果您使用的是SQL Server,请参阅:创建重复记录,如果已经存在的记录显示消息框asp.net [ ^ ]
You have not tagged your question properly. If you are using SQL Server then see this : create the duplicate record, if allready existing record show the message box asp.net[^]


我不知道这是webforms还是MVC网站制造。但是,如果是MVC,



创建一个接收事件编号的动作,然后连接到您的数据库并进行检查。

此操作可以通过AJAX方法调用,如果成功返回结果,则可以显示相应的消息。
I have no idea if this is a webforms or a MVC site you are making. However if it is MVC,

Create an action that receives an incident number and then connects to your database and checks.
This action could be called by an AJAX method and then if successful return the results so you can display the appropriate message.