Click here to Skip to main content
14,331,142 members
Rate this:
Please Sign up or sign in to vote.
See more:
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
Posted
Updated 17-Dec-16 17:56pm

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

I have found it for you, Retrieving Data Using a DataReader[^]
   
Comments
Member 12905345 17-Dec-16 23:56pm
   
I didnt find if the value of UserID could get and use it in if else condition
Peter Leow 18-Dec-16 0:00am
   
You are not writing the SQL statement correctly, refer http://www.w3schools.com/sql/sql_where.asp

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100