Click here to Skip to main content
14,272,050 members
   

C#

 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
OriginalGriff10-Jun-19 3:50
protectorOriginalGriff10-Jun-19 3:50 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
#realJSOP10-Jun-19 5:00
mve#realJSOP10-Jun-19 5:00 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
Gerry Schmitz10-Jun-19 5:47
mveGerry Schmitz10-Jun-19 5:47 
AnswerRe: How to create a tree node with menu, submenu, child, item Pin
BillWoodruff9-Jun-19 15:22
mveBillWoodruff9-Jun-19 15:22 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
Samiul0710-Jun-19 0:21
memberSamiul0710-Jun-19 0:21 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
BillWoodruff10-Jun-19 1:27
mveBillWoodruff10-Jun-19 1:27 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
Samiul0710-Jun-19 3:19
memberSamiul0710-Jun-19 3:19 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
OriginalGriff10-Jun-19 3:45
protectorOriginalGriff10-Jun-19 3:45 
Don't do it like that! Never concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Always use Parameterized queries instead.

When you concatenate strings, you cause problems because SQL receives commands like:
SELECT * FROM MyTable WHERE StreetAddress = 'Baker's Wood'
The quote the user added terminates the string as far as SQL is concerned and you get problems. But it could be worse. If I come along and type this instead: "x';DROP TABLE MyTable;--" Then SQL receives a very different command:
SELECT * FROM MyTable WHERE StreetAddress = 'x';DROP TABLE MyTable;--'
Which SQL sees as three separate commands:
SELECT * FROM MyTable WHERE StreetAddress = 'x';
A perfectly valid SELECT
DROP TABLE MyTable;
A perfectly valid "delete the table" command
--'
And everything else is a comment.
So it does: selects any matching rows, deletes the table from the DB, and ignores anything else.

So ALWAYS use parameterized queries! Or be prepared to restore your DB from backup frequently. You do take backups regularly, don't you?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: How to create a tree node with menu, submenu, child, item Pin
BillWoodruff10-Jun-19 6:59
mveBillWoodruff10-Jun-19 6:59 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
Samiul0710-Jun-19 12:27
memberSamiul0710-Jun-19 12:27 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
Samiul0710-Jun-19 12:44
memberSamiul0710-Jun-19 12:44 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
BillWoodruff10-Jun-19 17:05
mveBillWoodruff10-Jun-19 17:05 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
BillWoodruff11-Jun-19 0:53
mveBillWoodruff11-Jun-19 0:53 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
Samiul0711-Jun-19 5:31
memberSamiul0711-Jun-19 5:31 
AnswerRe: How to create a tree node with menu, submenu, child, item Pin
#realJSOP10-Jun-19 4:37
mve#realJSOP10-Jun-19 4:37 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
Richard MacCutchan10-Jun-19 4:49
protectorRichard MacCutchan10-Jun-19 4:49 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
#realJSOP10-Jun-19 4:57
mve#realJSOP10-Jun-19 4:57 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
Gerry Schmitz10-Jun-19 5:40
mveGerry Schmitz10-Jun-19 5:40 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
#realJSOP10-Jun-19 9:17
mve#realJSOP10-Jun-19 9:17 
GeneralRe: How to create a tree node with menu, submenu, child, item Pin
Gerry Schmitz10-Jun-19 10:04
mveGerry Schmitz10-Jun-19 10:04 
QuestionHow to clean all the installers? Pin
_Q12_7-Jun-19 3:55
member_Q12_7-Jun-19 3:55 
AnswerRe: How to clean all the installers? Pin
OriginalGriff7-Jun-19 4:05
protectorOriginalGriff7-Jun-19 4:05 
PraiseRe: How to clean all the installers? Pin
Richard Deeming7-Jun-19 4:56
mveRichard Deeming7-Jun-19 4:56 
GeneralRe: How to clean all the installers? Pin
OriginalGriff7-Jun-19 5:06
protectorOriginalGriff7-Jun-19 5:06 
GeneralRe: How to clean all the installers? Pin
_Q12_7-Jun-19 19:40
member_Q12_7-Jun-19 19: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.