什麼是與此查詢的問題:錯誤解析SQL查詢
string DelteQuerry = "DELETE ID,radif,Name, Type, Description, Price, city FROM Users WHERE ID = '" + searchtxt.Text + "'";
它會顯示解析錯誤:
[ Token line number = 1,Token line offset = 8,Token in error = (]
請幫
什麼是與此查詢的問題:錯誤解析SQL查詢
string DelteQuerry = "DELETE ID,radif,Name, Type, Description, Price, city FROM Users WHERE ID = '" + searchtxt.Text + "'";
它會顯示解析錯誤:
[ Token line number = 1,Token line offset = 8,Token in error = (]
請幫
嘗試
string DelteQuerry = "DELETE FROM Users WHERE ID = '" + searchtxt.Text + "'";
沒有工作的方式刪除什麼 –
http://en.m.wikipedia.org/wiki/Delete_(SQL) –
什麼是錯誤信息? –
嘗試'DELETE FROM ...' –
另外,確保你確定'searchtxt.Text'不能包含單引號,或者總是來自可信來源(所以不是你的web應用程序的用戶)。 – Claude
我在INSERT中使用相同的查詢並且工作了 –