openFileDialog1.ShowDialog(); textBox1.Text = openFileDialog1.FileName; string fname = openFileDialog1.FileName; TextReader trs = new StreamReader(@fname); String s=trs.ReadLine(); s=s.ToString(); while (s != null) { String x = ""; for (int i = 0; i < s.Length; i++) { if(s[i]!='.')//add the required special characters along with it x += s[i]; } s = x; s = trs.ReadLine(); conn.Open(); SqlCommand cmd = new SqlCommand("insert into C_word (Words,Category) values('" + s +"','" + comboBox1.SelectedText + "')",conn); cmd.ExecuteNonQuery(); conn.Close();
s = trs.ReadLine();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)