-1
我有這個錯誤,每當我執行我的程序時,「在第1行」附近使用正確的語法「錯誤出現。在第1行''附近使用正確的語法
這是我試圖執行的查詢。
Connection();
sql_connect.Open();
string date_start = dateTimePicker_starting.Value.ToString();
string date_to = dateTimePicker_to.Value.ToString();
string empid = textBox_empid.Text;
sql_command = new MySqlCommand("select sum(lt_min_hours) as Total_Late from tbl_late where (late_date between '" + date_start + "' and '" + date_to + "' and empid = " + empid + ";", sql_connect);
sql_reader = sql_command.ExecuteReader();
我檢查了',並且它都有它的一對。 請healp。我是mysql新手。
謝謝!
無需添加'「」' –
我刪除,但仍然出現了錯誤。 – mimi
你的參數值是什麼? –