如何检查SQL中的行和项的值 [英] How to check the value of row and item in SQL
本文介绍了如何检查SQL中的行和项的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好。我有一个数据库,它有一个数据字段名称为UserID的表。我希望在UserID中获取1的值,以便在if else条件下使用它。我真的不知道如何编码它,并在谷歌找不到任何符合我的问题。谢谢。
我的尝试:
dr =(选择*来自tblLogin,其中UserId1)
dr = Execute.Reader
如果dr.Read = True那么
me。hide()
Form2.show
Hi. I have a database and it has a table where the data field name is "UserID" . I want to get the value of "1" in UserID for me to use it in if else condition. I dont really know how to code it and found nothing in the google that match my problem. Thanks.
What I have tried:
dr=(Select * from tblLogin where UserId "1)
dr=Execute.Reader
If dr. Read = True Then
me. hide()
Form2.show
推荐答案
我找到了你,使用DataReader检索数据 [ ^ ]
这篇关于如何检查SQL中的行和项的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文