Click here to Skip to main content
15,908,661 members
Home / Discussions / C#
   

C#

 
QuestionPitch Extraction Pin
Guybrush8619-Jul-07 1:15
Guybrush8619-Jul-07 1:15 
AnswerRe: Pitch Extraction Pin
ekynox19-Jul-07 1:57
ekynox19-Jul-07 1:57 
AnswerRe: Pitch Extraction Pin
ekynox22-Jul-07 0:42
ekynox22-Jul-07 0:42 
GeneralRe: Pitch Extraction Pin
Guybrush8622-Jul-07 3:44
Guybrush8622-Jul-07 3:44 
Questionstatus problem Pin
srinivassam19-Jul-07 0:56
srinivassam19-Jul-07 0:56 
AnswerRe: status problem Pin
Eduard Keilholz19-Jul-07 0:59
Eduard Keilholz19-Jul-07 0:59 
AnswerRe: status problem Pin
Martin#19-Jul-07 1:01
Martin#19-Jul-07 1:01 
AnswerRe: status problem Pin
Herman<T>.Instance19-Jul-07 1:09
Herman<T>.Instance19-Jul-07 1:09 
Hi,

How many records has your database and how do you know you have the proper row?

I would do it something like this:
<br />
String connection = "uid=sa; password=sa123; database=usermanagement; server=c113";<br />
<br />
SqlConnection con= new SqlConnection (connection);<br />
SqlCommand cmd=new SqlCommand ("select * from tbl_user_management where username ='" + txtUsername.Text + "'",con); // where clause ?<br />
                        <br />
SqlDataReader dr;<br />
//don't forget the try catch finally !<br />
con.Open ();<br />
dr=cmd.ExecuteReader ();<br />
<br />
if (dr.HasRows())<br />
	{<br />
	if (dr.Read())<br />
		{<br />
			// Don't understand these lines<br />
			Lbluser.Text = String.Empty;<br />
		        Lblpassword.Text =String.Empty;<br />
		        Txtusername.Text ="username";<br />
		        Txtpassword.Text ="password";  <br />
			// end Don't understand          <br />
		            int status = Convert.ToInt32(dr["status"].ToString());<br />
		}<br />
	}<br />
con.Close();<br />
switch (status)<br />
{<br />
	case 1: Response .Redirect ("admin.aspx"); break;<br />
	case 2: Response .Redirect ("Welcome.aspx"); break<br />
	default: break; // you could do something with a Error routine<br />
}<br />
<br />

GeneralRe: status problem Pin
srinivassam19-Jul-07 20:59
srinivassam19-Jul-07 20:59 
QuestionRun as? Pin
Captain Trips19-Jul-07 0:55
Captain Trips19-Jul-07 0:55 
AnswerRe: Run as? Pin
originSH19-Jul-07 1:12
originSH19-Jul-07 1:12 
QuestionThreading and delegate relation. Pin
Ron.S19-Jul-07 0:50
Ron.S19-Jul-07 0:50 
AnswerRe: Threading and delegate relation. Pin
Eduard Keilholz19-Jul-07 0:54
Eduard Keilholz19-Jul-07 0:54 
AnswerRe: Threading and delegate relation. Pin
Bijesh19-Jul-07 2:14
Bijesh19-Jul-07 2:14 
QuestionHow to pass a Control to a Method Pin
Herman<T>.Instance19-Jul-07 0:21
Herman<T>.Instance19-Jul-07 0:21 
AnswerRe: How to pass a Control to a Method Pin
Luc Pattyn19-Jul-07 0:35
sitebuilderLuc Pattyn19-Jul-07 0:35 
Questionentry point of OLE DB Provider Pin
George_George19-Jul-07 0:18
George_George19-Jul-07 0:18 
QuestionArraySorting: Pin
T.RATHA KRISHNAN19-Jul-07 0:08
T.RATHA KRISHNAN19-Jul-07 0:08 
AnswerRe: ArraySorting: Pin
Luc Pattyn19-Jul-07 0:19
sitebuilderLuc Pattyn19-Jul-07 0:19 
QuestionRe: ArraySorting: Pin
T.RATHA KRISHNAN19-Jul-07 0:23
T.RATHA KRISHNAN19-Jul-07 0:23 
AnswerRe: ArraySorting: Pin
CPallini19-Jul-07 0:22
mveCPallini19-Jul-07 0:22 
AnswerRe: ArraySorting: Pin
Luc Pattyn19-Jul-07 0:27
sitebuilderLuc Pattyn19-Jul-07 0:27 
QuestionHow do I add a base interface using ModuleBuilder.DefineType() Pin
fpdeguzma7818-Jul-07 23:55
fpdeguzma7818-Jul-07 23:55 
AnswerRe: How do I add a base interface using ModuleBuilder.DefineType() Pin
Thaer Hamael19-Jul-07 0:02
Thaer Hamael19-Jul-07 0:02 
AnswerRe: How do I add a base interface using ModuleBuilder.DefineType() Pin
fpdeguzma7819-Jul-07 21:40
fpdeguzma7819-Jul-07 21:40 

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.