C# OleDbCommand使用Parameter時更新0筆(沒有錯誤)

sql = "select * from abc where a=:a and b=:b " _oleDbCmd.Parameters.AddWithValue("a", "aaaaa"); _oleDbCmd.Parameters.AddWithValue("b", "bbbb"); 一般使用sqlCommand的Parameter時, 因為有指定名稱, 所以傳值到Parameter時不需與SQL參數順序相同, 但因為OleDbParameter不支援名稱, 所以一定要一樣順序 Reference web: https://msdn.microsoft.com/en-us/library/system.data.oledb.oledbcommand.parameters(v=vs.100).aspx