M
Michelle Stone
I am new to asp.net
after filling a DataReader object with some records from
a table, i want to check if the sPassword field of the
first record matches what the user has entereed. I use
the following:
if (reader.GetSqlString (4) == PasswordEdit.Text)
Response.Write ("pass");
else
Response.Write ("Sorry, wrong password");
I have hardcoded the column number (of the field
sPassword) as "4". But another day I may insert another
column at column#3, so sPassword will be come column#5.
Any way i can hardcode the name 'sPassword'?
While dealing with tables I can do .Table["Author"].
There has to be a similar way with columns, is it not?
thanks...
michelle stone
after filling a DataReader object with some records from
a table, i want to check if the sPassword field of the
first record matches what the user has entereed. I use
the following:
if (reader.GetSqlString (4) == PasswordEdit.Text)
Response.Write ("pass");
else
Response.Write ("Sorry, wrong password");
I have hardcoded the column number (of the field
sPassword) as "4". But another day I may insert another
column at column#3, so sPassword will be come column#5.
Any way i can hardcode the name 'sPassword'?
While dealing with tables I can do .Table["Author"].
There has to be a similar way with columns, is it not?
thanks...
michelle stone