所以我通过 c# 从 mdb 文件中获取了一些数据
"SELECT * FROM " + listBox1.GetItemText(listBox1.SelectedItem) + " WHERE Note = '" + listBox2.GetItemText(listBox2.SelectedItem).Replace("'","\'") + "'";
选择正确的数据,这里是
SELECT * FROM Main WHERE Note ='Hello'
mdb 数据结构看起来像这样被绘制为 CSV 文件:
"Record ID";Status;Placement;Private;Category;Note;Blob
14341665;4;2147483647;True;3;"""Hello"" - Neues
但是当我尝试删除条目时
"DELETE FROM " + listBox1.GetItemText(listBox1.SelectedItem) + " WHERE \"Record ID\" LIKE '" + dr[0] + "';";
或者
"DELETE FROM " + listBox1.GetItemText(listBox1.SelectedItem) + " WHERE \"Record ID\" = '" + dr[0] + "';";
例如,这看起来像
DELETE FROM Main WHERE "Record ID" LIKE '14341665';
条目只是留在那里。我可以重新运行 select 命令,甚至重新启动我的应用程序,mdb 没有改变。