Click here to Skip to main content
15,919,749 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRusty Coder Needs Help Pin
munklefish4-Jul-07 0:06
munklefish4-Jul-07 0:06 
AnswerRe: Rusty Coder Needs Help Pin
Urs Enzler4-Jul-07 0:22
Urs Enzler4-Jul-07 0:22 
GeneralRe: Rusty Coder Needs Help Pin
munklefish4-Jul-07 0:31
munklefish4-Jul-07 0:31 
Questionform authentication Pin
24891284-Jul-07 0:05
24891284-Jul-07 0:05 
QuestionProblem with SqlDataReader Pin
netwizerd4-Jul-07 0:01
netwizerd4-Jul-07 0:01 
AnswerRe: Problem with SqlDataReader Pin
Colin Angus Mackay4-Jul-07 0:09
Colin Angus Mackay4-Jul-07 0:09 
GeneralRe: Problem with SqlDataReader Pin
netwizerd4-Jul-07 2:50
netwizerd4-Jul-07 2:50 
GeneralRe: Problem with SqlDataReader Pin
Colin Angus Mackay4-Jul-07 3:17
Colin Angus Mackay4-Jul-07 3:17 
I do recommend using the Parameter route. They help prevent SQL Injection Attacks.

Have you tried writing the same query and running directly on SQL Server? Do you get any results?

I'm actually thinking that since you are only ever getting one value back (the roles) that ExecuteScalar would be better for your requirements (unless you are planning to get more data from the reader in the future)

ExecuteScalar retrieves one value only, the fist column of the first row. It will manage the data reader for you, so you don't have to worry about it. All you need to do is call ExecuteScalar instead of ExecuteReader and if the value isn't null you have matched the login.


Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...

"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."

Ready to Give up - Your help will be much appreciated.


My website

GeneralI give up! Pin
Colin Angus Mackay4-Jul-07 3:11
Colin Angus Mackay4-Jul-07 3:11 
GeneralRe: I give up! Pin
Pete O'Hanlon4-Jul-07 3:16
mvePete O'Hanlon4-Jul-07 3:16 
GeneralRe: I give up! Pin
Colin Angus Mackay4-Jul-07 3:25
Colin Angus Mackay4-Jul-07 3:25 
GeneralRe: I give up! Pin
Pete O'Hanlon4-Jul-07 3:38
mvePete O'Hanlon4-Jul-07 3:38 
GeneralRe: I give up! Pin
Pete O'Hanlon4-Jul-07 3:54
mvePete O'Hanlon4-Jul-07 3:54 
GeneralRe: I give up! Pin
Colin Angus Mackay4-Jul-07 4:15
Colin Angus Mackay4-Jul-07 4:15 
GeneralRe: I give up! Pin
Pete O'Hanlon4-Jul-07 5:02
mvePete O'Hanlon4-Jul-07 5:02 
Questionhighlighting search terms Pin
marky7773-Jul-07 23:44
marky7773-Jul-07 23:44 
AnswerRe: highlighting search terms Pin
Pete O'Hanlon3-Jul-07 23:47
mvePete O'Hanlon3-Jul-07 23:47 
AnswerRe: highlighting search terms Pin
Pete O'Hanlon3-Jul-07 23:57
mvePete O'Hanlon3-Jul-07 23:57 
GeneralRe: highlighting search terms Pin
marky7774-Jul-07 0:10
marky7774-Jul-07 0:10 
QuestionGridview - dynamically added checkbox fields are Disabled Pin
Mohamed El Gohary3-Jul-07 23:39
Mohamed El Gohary3-Jul-07 23:39 
QuestionBinding Radio Button Control in GridView Pin
Ajeet mittal3-Jul-07 23:36
Ajeet mittal3-Jul-07 23:36 
Question'Sys' is undefined Pin
Abubakarsb3-Jul-07 23:23
Abubakarsb3-Jul-07 23:23 
AnswerRe: 'Sys' is undefined Pin
Urs Enzler3-Jul-07 23:35
Urs Enzler3-Jul-07 23:35 
GeneralRe: 'Sys' is undefined Pin
Abubakarsb3-Jul-07 23:41
Abubakarsb3-Jul-07 23:41 
GeneralRe: 'Sys' is undefined Pin
Urs Enzler4-Jul-07 0:19
Urs Enzler4-Jul-07 0:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.