Click here to Skip to main content
15,885,366 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
Questionipc with remoting problem Pin
cignox127-May-09 20:35
cignox127-May-09 20:35 
Questionhow to store logout time. Pin
Member 356741127-May-09 19:00
Member 356741127-May-09 19:00 
AnswerRe: how to store logout time. Pin
Colin Angus Mackay27-May-09 21:00
Colin Angus Mackay27-May-09 21:00 
GeneralRe: how to store logout time. Pin
Pete O'Hanlon27-May-09 21:34
mvePete O'Hanlon27-May-09 21:34 
AnswerRe: how to store logout time. Pin
saanj28-May-09 2:57
saanj28-May-09 2:57 
Questionexception-array index out of bound Pin
manjusha s27-May-09 3:04
manjusha s27-May-09 3:04 
AnswerRe: exception-array index out of bound Pin
Eddy Vluggen27-May-09 3:14
professionalEddy Vluggen27-May-09 3:14 
AnswerRe: exception-array index out of bound Pin
Hoorfar29-May-09 21:34
Hoorfar29-May-09 21:34 
your code is good and validate user and password but is not optimazed.
exception occered in
if ((rs[0].ToString() == T1.Text) && (rs[31].ToString()== T2.Text))

because in your query you select only two columns from table
and sql server return two selected columns but use number 31 for index.
when you read data by SqlDataReader you can use indexed mode
sqlDataReader[item index]

item index must one less from columns count or one less from sqlDataReader.FieldCount
to solve your problem change your if to
if ((rs[0].ToString() == T1.Text) && (rs[1].ToString()== T2.Text))

for indexing item in datareader and dataset it not importent how many columns is in table it importent how many columns are selected in query
QuestionCrystal Report in.net Pin
srinisiv27-May-09 2:27
srinisiv27-May-09 2:27 
AnswerRe: Crystal Report in.net Pin
Eddy Vluggen28-May-09 11:19
professionalEddy Vluggen28-May-09 11:19 
QuestionWhat is .net compact and .net framwork? Pin
xingselex26-May-09 22:00
xingselex26-May-09 22:00 
AnswerRe: What is .net compact and .net framwork? Pin
Eddy Vluggen26-May-09 22:44
professionalEddy Vluggen26-May-09 22:44 
Questionstore procedure Pin
manjusha s26-May-09 21:33
manjusha s26-May-09 21:33 
AnswerRe: store procedure Pin
Pete O'Hanlon26-May-09 21:45
mvePete O'Hanlon26-May-09 21:45 
AnswerRe: store procedure Pin
saanj28-May-09 3:03
saanj28-May-09 3:03 
QuestionHow to override the message loop in winforms? Pin
Felix Collins26-May-09 17:56
Felix Collins26-May-09 17:56 
AnswerRe: How to override the message loop in winforms? Pin
Pete O'Hanlon26-May-09 21:39
mvePete O'Hanlon26-May-09 21:39 
GeneralRe: How to override the message loop in winforms? Pin
Felix Collins27-May-09 16:55
Felix Collins27-May-09 16:55 
GeneralRe: How to override the message loop in winforms? Pin
Luc Pattyn27-May-09 17:20
sitebuilderLuc Pattyn27-May-09 17:20 
GeneralRentrant event processing. Was : How to override the message loop in winforms? Pin
Felix Collins27-May-09 18:12
Felix Collins27-May-09 18:12 
GeneralRe: Rentrant event processing. Was : How to override the message loop in winforms? Pin
dybs29-May-09 17:10
dybs29-May-09 17:10 
GeneralRe: Rentrant event processing. Was : How to override the message loop in winforms? Pin
Felix Collins31-May-09 12:49
Felix Collins31-May-09 12:49 
GeneralRe: Rentrant event processing. Was : How to override the message loop in winforms? Pin
Felix Collins7-Jun-09 16:33
Felix Collins7-Jun-09 16:33 
QuestionNATUPNPLib - Which local IP to use? Pin
Andrey U26-May-09 11:42
Andrey U26-May-09 11:42 
AnswerRe: NATUPNPLib - Which local IP to use? Pin
Dave Kreskowiak27-May-09 7:42
mveDave Kreskowiak27-May-09 7:42 

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.