我有這個代碼選擇低於應:的SqlCommand從那裏發出
Select column odjezd
From table stanice
Order by odjezd
where akce=zakce.Text
SqlCommand combobox = new SqlCommand("SELECT odjezd FROM stanice
ORDER BY odjezd ASC
WHERE akce="+zakce.Text, spojeni);
它給我這個錯誤:近WHERE
不正確的語法。
有人請改善我的代碼嗎? 在此先感謝
而你***總是應該使用參數化查詢 - 不要像這樣連接你的SQL - 極易受SQL注入攻擊.... –