error in sentence mysql
#1

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
.


Messages In This Thread
[No subject] - by ucaff - 05-14-2015, 03:47 AM
[No subject] - by Wizatek - 05-14-2015, 10:31 AM
[No subject] - by ucaff - 05-14-2015, 03:37 PM
[No subject] - by Wizatek - 05-14-2015, 04:08 PM
[No subject] - by ZaTii - 05-14-2015, 04:10 PM
[No subject] - by ucaff - 05-14-2015, 04:21 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)