|
Subject:
|
sql statement
|
|
Posted By:
|
sand133
|
Post Date:
|
6/26/2004 8:21:50 AM
|
hi i want to create a sql statement that gets all records from a table (admin) where the username = (what the user typed in, into the text box) and password = (what the user typed in, into the text box)
so far i have managed to come up with this, i dont know whether this is correct becuase when i debug i find my datareader object is empty
"Select * From admin Where password=? and username=?" many thanks
|
|
Reply By:
|
abdusalam
|
Reply Date:
|
6/26/2004 9:24:07 AM
|
select * from admin where userid ='" & txtuser.text & "'" And password = '" & pass.text & "'"
hope it will help you...
Stay Beautiful, Abdul Salam
|
|
Reply By:
|
Lalit_Pratihari
|
Reply Date:
|
9/29/2004 9:48:16 AM
|
Hi,
Just a little addition:
Do remember to trim the value in the text boxes and add the single quotes if the datatype is of character type.
SELECT * FROM ADMIN WHERE USERID = '" & Trim(txtuser.text) & "'" AND PASSWORD = '" & Trim(pass.text) & "'"
Thanks,
Lalit Life Means More...
|