Click here to Skip to main content
15,905,867 members
Home / Discussions / C#
   

C#

 
QuestionQuestion System.StackOverflowException problem. Pin
hdv21213-Sep-08 3:32
hdv21213-Sep-08 3:32 
AnswerRe: Question System.StackOverflowException problem. Pin
Dave Kreskowiak13-Sep-08 5:20
mveDave Kreskowiak13-Sep-08 5:20 
GeneralRe: Question System.StackOverflowException problem. [modified] Pin
hdv21213-Sep-08 6:16
hdv21213-Sep-08 6:16 
GeneralRe: Question System.StackOverflowException problem. Pin
Dave Kreskowiak13-Sep-08 7:13
mveDave Kreskowiak13-Sep-08 7:13 
GeneralRe: Question System.StackOverflowException problem. Pin
hdv21213-Sep-08 7:24
hdv21213-Sep-08 7:24 
GeneralRe: Question System.StackOverflowException problem. Pin
S. Senthil Kumar13-Sep-08 9:23
S. Senthil Kumar13-Sep-08 9:23 
GeneralRe: Question System.StackOverflowException problem. Pin
hdv21213-Sep-08 10:14
hdv21213-Sep-08 10:14 
Questionhow to make icon for file Pin
nmhai8313-Sep-08 3:26
nmhai8313-Sep-08 3:26 
AnswerRe: how to make icon for file Pin
Giorgi Dalakishvili13-Sep-08 3:30
mentorGiorgi Dalakishvili13-Sep-08 3:30 
GeneralRe: how to make icon for file Pin
nmhai8314-Sep-08 21:59
nmhai8314-Sep-08 21:59 
GeneralRe: how to make icon for file Pin
Giorgi Dalakishvili15-Sep-08 0:08
mentorGiorgi Dalakishvili15-Sep-08 0:08 
QuestionCall function in aspx file from javascript file(Validation)????? Pin
g_amol13-Sep-08 1:30
g_amol13-Sep-08 1:30 
NewsRe: Call function in aspx file from javascript file(Validation)????? Pin
Mbah Dhaim13-Sep-08 3:12
Mbah Dhaim13-Sep-08 3:12 
QuestionRemote Print (Crystal Report) Pin
mehrdadc4813-Sep-08 0:24
mehrdadc4813-Sep-08 0:24 
AnswerRe: Remote Print (Crystal Report) Pin
Dave Kreskowiak13-Sep-08 5:17
mveDave Kreskowiak13-Sep-08 5:17 
QuestionPossible Bug?? Pin
Muammar©12-Sep-08 23:28
Muammar©12-Sep-08 23:28 
AnswerRe: Possible Bug?? Pin
Muammar©12-Sep-08 23:42
Muammar©12-Sep-08 23:42 
JokeRe: Possible Bug?? Pin
Mycroft Holmes13-Sep-08 0:12
professionalMycroft Holmes13-Sep-08 0:12 
GeneralRe: Possible Bug?? Pin
Muammar©13-Sep-08 0:21
Muammar©13-Sep-08 0:21 
GeneralRe: Possible Bug?? Pin
Anthony Mushrow13-Sep-08 0:54
professionalAnthony Mushrow13-Sep-08 0:54 
GeneralRe: Possible Bug?? Pin
User 665813-Sep-08 1:04
User 665813-Sep-08 1:04 
AnswerRe: Possible Bug?? Pin
#realJSOP13-Sep-08 1:03
professional#realJSOP13-Sep-08 1:03 
That's poor programming practice. You should contain the comparison in parens, like so:

String strSelectStatement = "SELECT EMP_NAME FROM EMPS WHERE EMP_TYPE =" (MyCheckBox.Checked == true) ? "1" : "0";


Or, you could use string.Format:

string strSelectStatement = string.Format("SELECT EMP_NAME FROM EMPS WHERE EMP_TYPE ={0}", (MyCheckBox.Checked == true) ? "1" : "0");


Or, you could use the StringBuilder class:

StringBuilder sql = new StringBuilder("SELECT EMP_NAME FROM EMPS WHERE EMP_TYPE =");
sql.Append((MyCheckBox.Checked == true) ? "1" : "0");


No matter how you do it, you should enclose the comparison with parenthesis...


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


QuestionTableAdapter.Insert method problem. [modified] Pin
hdv21212-Sep-08 23:19
hdv21212-Sep-08 23:19 
QuestionGet exe/dll Icon Pin
Muammar©12-Sep-08 21:46
Muammar©12-Sep-08 21:46 
AnswerRe: Get exe/dll Icon Pin
Muammar©12-Sep-08 22:08
Muammar©12-Sep-08 22:08 

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.