Click here to Skip to main content
16,006,001 members
Home / Discussions / Java
   

Java

 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
pancakeleh6-Jan-11 17:48
pancakeleh6-Jan-11 17:48 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan6-Jan-11 21:49
mveRichard MacCutchan6-Jan-11 21:49 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Arman S.7-Jan-11 6:54
Arman S.7-Jan-11 6:54 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan7-Jan-11 8:26
mveRichard MacCutchan7-Jan-11 8:26 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Arman S.7-Jan-11 8:35
Arman S.7-Jan-11 8:35 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan7-Jan-11 8:58
mveRichard MacCutchan7-Jan-11 8:58 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Arman S.7-Jan-11 9:23
Arman S.7-Jan-11 9:23 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
jschell8-Jan-11 8:59
jschell8-Jan-11 8:59 
Arman S. wrote:
Agreed - generally speaking. But not quite, for this concrete situation.
If it were so, why wouldn't you go ahead and explain the whole theory behind secure Web development to the OP?
Common sense tells me, that you (and I) didn't do it as:
* We are not sure if it will solve a bit of OP's problem
* We are not sure if OP is even doing e.g. Web
* We are not sure if the proposed solution above (by myself) even targets the right problem (because of poor explanation of the problem)

My belief is that for beginners (assuming OP is) what matters most is the tangible result, something they can see and the feeling that something is working.


Which would matter only if any of that is relevant.

One uses parameters (bind variables) in SQL because it prevents injection attacks AND because it correctly deals with other issues in correctly constructing SQL. And this applies to any programming language that supports such usage.

There are very few cases where one should be using string concatenation without using parameters. Even when concatenation is used in constructing SQL, such as with variable list productions, parameter usage is still better.

So you are presenting a technique that one should almost never use.
Your rationalizations do not change that.

And by the way SQL injection attacks are not something that are only relevant in Web apps.
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan8-Jan-11 21:49
mveRichard MacCutchan8-Jan-11 21:49 
GeneralRe: Comparing values in the table with the value the user keyed in [modified] Pin
pancakeleh9-Jan-11 16:59
pancakeleh9-Jan-11 16:59 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan9-Jan-11 23:00
mveRichard MacCutchan9-Jan-11 23:00 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
pancakeleh10-Jan-11 19:43
pancakeleh10-Jan-11 19:43 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan10-Jan-11 23:21
mveRichard MacCutchan10-Jan-11 23:21 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
pancakeleh12-Jan-11 21:48
pancakeleh12-Jan-11 21:48 
GeneralRe: Comparing values in the table with the value the user keyed in Pin
Richard MacCutchan12-Jan-11 22:06
mveRichard MacCutchan12-Jan-11 22:06 
QuestionNeed urgent help in assignment of JAVA, any idea suggestion plz Pin
aesthetic.crazy5-Jan-11 12:13
aesthetic.crazy5-Jan-11 12:13 
AnswerRe: Need urgent help in assignment of JAVA, any idea suggestion plz Pin
Richard MacCutchan5-Jan-11 21:41
mveRichard MacCutchan5-Jan-11 21:41 
AnswerRe: Need urgent help in assignment of JAVA, any idea suggestion plz Pin
David Skelly5-Jan-11 22:19
David Skelly5-Jan-11 22:19 
GeneralRe: Need urgent help in assignment of JAVA, any idea suggestion plz Pin
aesthetic.crazy5-Jan-11 23:52
aesthetic.crazy5-Jan-11 23:52 
GeneralRe: Need urgent help in assignment of JAVA, any idea suggestion plz Pin
David Skelly6-Jan-11 3:26
David Skelly6-Jan-11 3:26 
GeneralRe: Need urgent help in assignment of JAVA, any idea suggestion plz Pin
aesthetic.crazy6-Jan-11 10:38
aesthetic.crazy6-Jan-11 10:38 
AnswerRe: Need urgent help in assignment of JAVA, any idea suggestion plz Pin
jschell6-Jan-11 9:25
jschell6-Jan-11 9:25 
GeneralRe: Need urgent help in assignment of JAVA, any idea suggestion plz Pin
aesthetic.crazy6-Jan-11 10:39
aesthetic.crazy6-Jan-11 10:39 
GeneralRe: Need urgent help in assignment of JAVA, any idea suggestion plz Pin
jschell7-Jan-11 13:49
jschell7-Jan-11 13:49 
QuestionCreating an ArrayBinaryTree Pin
nee-kow5-Jan-11 6:48
nee-kow5-Jan-11 6:48 

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.