05-14-2015, 03:47 AM
Hello guys
I take the data from a Datragrid....
" IniRead();
string constring = "datasource=" + Host.Text + ";port=3306;username=" + User.Text + ";password=" + Passwd.Text;
MySqlConnection conDataBase = new MySqlConnection(constring);
string Query = "DELETE " + DataBase.Text + "FROM .t_quest WHERE a_index='" + QuestID.Text + "'";
MySqlCommand cmdDataBase = new MySqlCommand(Query, conDataBase);
MySqlDataReader myReader;
try
{
conDataBase.Open();
myReader = cmdDataBase.ExecuteReader();
MessageBox.Show("(DELETE OK)!");
while (myReader.Read())
{
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
SelectDB(); "
........Someone could correct code ?, failed to make it work.
I want to delete rows in the db....
from already thank you very much for your help
.

