Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding OLEDB Crashes
Message
 
 
To
23/08/2010 16:45:51
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
Miscellaneous
Thread ID:
01478041
Message ID:
01478047
Views:
36
>I'm doing an application that reads and updates some VFP tables along with SQL Server tables.
>
>For a variety of reason, I'm not using data binding, but instead I'm constructing and executing commands as follows:
>
>string strupdatestring = "Update somast01 SET ponum = ' '" + textBoxPonum.Text + “’"
>
>During testing, I mistakenly typed a ""' in the textBoxPonum field and when the program ran the command above (ExecuteNonQuery), the provider dutifully returned a message that the command contained junk.
>
>Is there any shortcut here or do I have to check every field for things like quote signs?
>
>Besides quote signs and apostrophes, what else can bring it down?

SQL Server injection can bring this down. Next time try to type

'1;drop table Somast01'

in the testboxPoNum
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform