Click here to Skip to main content
15,886,110 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Help with a static class Pin
Richard Deeming15-May-15 4:11
mveRichard Deeming15-May-15 4:11 
GeneralRe: Help with a static class Pin
Stephen Holdorf15-May-15 6:52
Stephen Holdorf15-May-15 6:52 
GeneralRe: Help with a static class Pin
Richard Deeming15-May-15 7:04
mveRichard Deeming15-May-15 7:04 
GeneralRe: Help with a static class Pin
Sascha Lefèvre15-May-15 8:23
professionalSascha Lefèvre15-May-15 8:23 
GeneralRe: Help with a static class Pin
Stephen Holdorf18-May-15 1:47
Stephen Holdorf18-May-15 1:47 
GeneralRe: Help with a static class [modified] Pin
Sascha Lefèvre18-May-15 2:07
professionalSascha Lefèvre18-May-15 2:07 
GeneralRe: Help with a static class Pin
Sascha Lefèvre18-May-15 2:10
professionalSascha Lefèvre18-May-15 2:10 
GeneralRe: Help with a static class Pin
Richard Deeming18-May-15 2:36
mveRichard Deeming18-May-15 2:36 
holdorf wrote:
Remember I have only one function to fix and handle this problem.

Then your project is doomed.

Once you have used string concatenation to inject parameters into a query, there is absolutely no way to undo that. Even if you manage to write or find a routine to parse a SQL string, it's too late; the damage has already been done.

What you are asking for is essentially the same as saying you've baked a cake, but now you've realised the eggs were off, and you want to go back and replace the eggs without re-making the cake. It can't be done.

The ONLY solution for this problem is to re-visit every piece of code which generates a SQL query and update it to use a parameterized query.

If your boss doesn't understand that, then point him to Troy Hunt's explanation[^], or Bobby Tables[^].



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Help with a static class Pin
Stephen Holdorf18-May-15 3:48
Stephen Holdorf18-May-15 3:48 
GeneralRe: Help with a static class Pin
Richard Deeming18-May-15 3:50
mveRichard Deeming18-May-15 3:50 
GeneralRe: Help with a static class Pin
jkirkerx18-May-15 12:19
professionaljkirkerx18-May-15 12:19 
GeneralRe: Help with a static class Pin
Stephen Holdorf20-May-15 3:02
Stephen Holdorf20-May-15 3:02 
GeneralRe: Help with a static class Pin
Sascha Lefèvre20-May-15 4:22
professionalSascha Lefèvre20-May-15 4:22 
GeneralRe: Help with a static class Pin
Stephen Holdorf20-May-15 4:28
Stephen Holdorf20-May-15 4:28 
GeneralRe: Help with a static class Pin
Sascha Lefèvre20-May-15 4:34
professionalSascha Lefèvre20-May-15 4:34 
GeneralRe: Help with a static class Pin
Stephen Holdorf20-May-15 4:40
Stephen Holdorf20-May-15 4:40 
GeneralRe: Help with a static class Pin
Sascha Lefèvre20-May-15 4:43
professionalSascha Lefèvre20-May-15 4:43 
GeneralRe: Help with a static class Pin
Stephen Holdorf20-May-15 4:45
Stephen Holdorf20-May-15 4:45 
GeneralRe: Help with a static class Pin
Sascha Lefèvre20-May-15 4:54
professionalSascha Lefèvre20-May-15 4:54 
GeneralRe: Help with a static class Pin
Stephen Holdorf20-May-15 5:21
Stephen Holdorf20-May-15 5:21 
GeneralRe: Help with a static class Pin
Sascha Lefèvre20-May-15 5:26
professionalSascha Lefèvre20-May-15 5:26 
GeneralRe: Help with a static class Pin
jkirkerx20-May-15 6:55
professionaljkirkerx20-May-15 6:55 
SuggestionRe: Help with a static class Pin
Richard Deeming20-May-15 7:08
mveRichard Deeming20-May-15 7:08 
GeneralRe: Help with a static class Pin
jkirkerx20-May-15 8:10
professionaljkirkerx20-May-15 8:10 
GeneralRe: Help with a static class Pin
Richard Deeming20-May-15 8:20
mveRichard Deeming20-May-15 8:20 

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.