如何匹配服务器数据中的本地页面数据? [英] How to match local page data from server data ?

查看:60
本文介绍了如何匹配服务器数据中的本地页面数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在asp.net页面有一个本地数据,并且必须检查和匹配数据库中的数据是否存在于数据库中?



如果存在,那么我将继续,否则我将结束操作。

i have a local data in an asp.net page and have to check & match that data in database that is that data exist in database or not ?

if exist then i will proceed otherwise i will end operation.

推荐答案

查询



SELECT * FROM your_table WHERE id = @id< - @id是SP参数



如果你需要处理依赖于此:



IF EXISTS(SELECT * from your_table WHERE id = @id)

BEGIN



- DO SOMETHING


结束

ELSE

BEGIN

- 做一些事情

结束



请不要问我们为您编写代码,示例很多且很容易用Google搜索。
The query

SELECT * FROM your_table WHERE id = @id <-- @id is SP parameter

If you need processing dependant on this:

IF EXISTS (SELECT * FROM your_table WHERE id = @id)
BEGIN

-- DO SOMETHING

END
ELSE
BEGIN
-- DO SOMETHING ELSE
END

Please do not ask that we write the code for you, the examples are plenty and easily googled.


这篇关于如何匹配服务器数据中的本地页面数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆