mohammad1359 0 Newbie Poster

example string:
/* hack */
string SQLSTR="SELECT * from pass where username="+"'"+textBox1.Text+"'"+"and password="+"'"+textBox2.Text+"'";
best war for in message is:
/* not hack */
string SQLSTR=string.Format("select * from pass where username='{0}' and password='{1}'",textBox1.Text,textBox2.Text);