3
Answers

database connection problem

jeevan mummadi

jeevan mummadi

16y
2.3k
1

private void OnUpdateRichEdit(string msg)

{

SqlConnection con = new SqlConnection("server=localhost;initial catalog=online_application1;user id=sa;pwd=");

//richTextBox1.AppendText(msg);

rtrecvdata.Text = msg;

con.Open();

string st="insert into data(totaldata) values('" + rtrecvdata .Text + "') " ;

SqlCommand cmd = new SqlCommand(st, con);

cmd.ExecuteNonQuery();

con.Close();

}

for every one min data will come into this method,received data is saved in database.but problem is code is executed but data is not saved in database.

tell me the reason...

Answers (3)
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 15y
0
Amit Choudhary

Amit Choudhary

NA 27.7k 3m 15y
hi friend,

Please give more details about it how you want to read. if you want to read HTML file you can read it as XML file  programmatically and if you want to read it using like javascript then you can identify the table by giving it an id. and read the rows.

Please mark as answer if it helps.