mysql - How do I parameterize how users input their Connection Strings in C#? -



mysql - How do I parameterize how users input their Connection Strings in C#? -

i've learned how parameterize text boxes when we're talking inserting info within database, i'd implement same technique while manually putting connection string sql database. code goes this:

connectionstring = "server=localhost;uid=" + usr.text + ";pwd=" + pwd.text;

and think quite vulnerable sql injections. suggestions?

it's not vulnerable sql injections since sql isn't beingness used in case. can't access tables , records specifying in connection string, nor can receive info specifying connection string.

it is vulnerable connection string property injection, nikola mentions in answer. see question, " ms access - prevent sql injection in connection string ".

c# mysql

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -