Really I don't know if my doing is correct programmatically or not so I hope to point me out.
I have a DataGridView C# showing data from linked MySQL database and some input boxes to help inserting data into the database and all goes alright, but when I decided to make inserting operation in a separate new thread I do the following inside add button:
private void AddToolStripMenuItem_Click(object sender, EventArgs e){
try{
new thread(() =>{
// insertion code goes here
//to update DataGridView after inserting
this.studentinfoTableAdapter.Fill(this.schoolDataSet.studentinfo);
}).start();
}catch(exception ex){...}
}
so then a new dialog error is popping-up in each new insert operation and nothing saved, here is the error:
I thought the error maybe caused of this
conflicting in this.studentinfoTableAdapter.Fill(this.schoolDataSet.studentinfo);
I did correct it but the error still there.
Any suggestion could help me out and appreciated.