Click here to Skip to main content
15,911,141 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple ListBox Event Pin
Stefan Troschuetz12-Jan-05 21:41
Stefan Troschuetz12-Jan-05 21:41 
GeneralRe: Simple ListBox Event Pin
Snowjim12-Jan-05 23:21
Snowjim12-Jan-05 23:21 
GeneralRe: Simple ListBox Event Pin
Stefan Troschuetz12-Jan-05 23:30
Stefan Troschuetz12-Jan-05 23:30 
GeneralVS.NET Add-In Problem Pin
Guinness4Strength12-Jan-05 12:13
Guinness4Strength12-Jan-05 12:13 
GeneralARRAY LIST Pin
suthagar12-Jan-05 10:29
suthagar12-Jan-05 10:29 
GeneralRe: ARRAY LIST Pin
Christian Graus12-Jan-05 10:53
protectorChristian Graus12-Jan-05 10:53 
Generalnot post back Pin
Ahmed Galal12-Jan-05 7:40
Ahmed Galal12-Jan-05 7:40 
GeneralRe: not post back Pin
Christian Graus12-Jan-05 8:56
protectorChristian Graus12-Jan-05 8:56 
GeneralRe: not post back Pin
Ahmed Galal12-Jan-05 10:12
Ahmed Galal12-Jan-05 10:12 
GeneralRe: not post back Pin
Esmo200012-Jan-05 9:54
Esmo200012-Jan-05 9:54 
GeneralList Tables Pin
Dirso12-Jan-05 7:38
Dirso12-Jan-05 7:38 
GeneralNeed assistance with System.Diagnostics.process.startinfo.createnowindow ... Pin
new_phoenix12-Jan-05 7:08
new_phoenix12-Jan-05 7:08 
GeneralByte array to struct Pin
Arjan Schouten12-Jan-05 6:39
Arjan Schouten12-Jan-05 6:39 
GeneralRe: difference between .NET remoting and shared/private assembly? Pin
liyang yu12-Jan-05 5:58
liyang yu12-Jan-05 5:58 
Generalproblem with SQL Pin
ronin177012-Jan-05 5:40
ronin177012-Jan-05 5:40 
GeneralRe: problem with SQL Pin
Steve Maier12-Jan-05 5:45
professionalSteve Maier12-Jan-05 5:45 
GeneralRe: problem with SQL Pin
Jesse Squire12-Jan-05 6:28
Jesse Squire12-Jan-05 6:28 
GeneralRe: problem with SQL Pin
Dave Kreskowiak12-Jan-05 9:02
mveDave Kreskowiak12-Jan-05 9:02 
ronin1770 wrote:
Any idea(s) : what i am doing wrong

So many things, it's almost funny!

1) You're using string concatentation to build an SQL statement. The gods around here will smite you for such foolishness. Like the other posters pointed out, you have opened yourself up to many an SQL injection attack.

2) There is no space between the keyword BETWEEN and the single quote next to it. There should be...

3) A comma between your first date and the keyword AND will cause an error in the SQL statement.

4) Your completely at the mercy of the user to type in the date in the EXACT format that is required by the SQL statement.

We've said this a thousand times in the forums: CONVERT THIS STATEMET INTO A PARAMETERIZED QUERY! If you were to release code like this into a production application and sell it, your customers will hang you by your nads when they find out about it!

The SqlParameter objects will handle filtering for SQL Injection attacks for you and handle converting the DateTime objects you supply into the correct SQL format.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralConfiguring web service Pin
Esmo200012-Jan-05 4:38
Esmo200012-Jan-05 4:38 
GeneralRe: Configuring web service Pin
Esmo200012-Jan-05 9:57
Esmo200012-Jan-05 9:57 
Questiondifference between .NET remoting and shared/private assembly? Pin
liyang yu12-Jan-05 4:01
liyang yu12-Jan-05 4:01 
AnswerRe: difference between .NET remoting and shared/private assembly? Pin
Steve Maier12-Jan-05 4:28
professionalSteve Maier12-Jan-05 4:28 
GeneralRe: difference between .NET remoting and shared/private assembly? Pin
liyang yu12-Jan-05 4:49
liyang yu12-Jan-05 4:49 
GeneralRe: difference between .NET remoting and shared/private assembly? Pin
Steve Maier12-Jan-05 5:42
professionalSteve Maier12-Jan-05 5:42 
GeneralLinking HxS Help file to a C# application Pin
mikey_g12-Jan-05 3:49
mikey_g12-Jan-05 3:49 

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.