斌 斌斌 Unregistered / Unconfirmed GUEST, unregistred user! 2000-11-21 #1 在DELPHI4中,如何用SQL语句(delete 语句)删除表中记录?? 谢谢!
S seago Unregistered / Unconfirmed GUEST, unregistred user! 2000-11-21 #2 with Query1 do begin Close; SQL.Clear; SQL.Add('DELETE FROM table_name WHERE .....'); ExecSql; end;
S sportsman Unregistered / Unconfirmed GUEST, unregistred user! 2000-11-21 #3 delete table_name where column=... delete table1 where column in(select column from table2)
斌 斌斌 Unregistered / Unconfirmed GUEST, unregistred user! 2000-11-21 #4 提示 error creating cursor handle 错误。
T terry_lzs Unregistered / Unconfirmed GUEST, unregistred user! 2000-11-21 #5 cursorlocation设置为clUseClient adoquery1.sql.add('delete from tablename'); adoquery1.sql.add('where....'); adoquery1.execsql
cursorlocation设置为clUseClient adoquery1.sql.add('delete from tablename'); adoquery1.sql.add('where....'); adoquery1.execsql
B BaKuBaKu Unregistered / Unconfirmed GUEST, unregistred user! 2000-11-21 #6 To 斌斌: 提示 error creating cursor handle 错误是因为你用 Open 执行非 Select 语句的原因, 用 Query.ExecSQL 就好了。
A ArJianzeng Unregistered / Unconfirmed GUEST, unregistred user! 2000-11-22 #8 Query1.Active :=False; Query1.SQL.Clear; Query1.SQL.Text :='delete from TableName where Field1 ="Value1"'; Query1.ExecSQL;
Query1.Active :=False; Query1.SQL.Clear; Query1.SQL.Text :='delete from TableName where Field1 ="Value1"'; Query1.ExecSQL;
H hhzh426 Unregistered / Unconfirmed GUEST, unregistred user! 2000-11-22 #9 SQL SERVER: DELETE 表名 WHERE 条件//如果条件为空的话则删除表中所有记录
S scorpions Unregistered / Unconfirmed GUEST, unregistred user! 2000-11-24 #10 with Query do begin Close; SQL.Clear; SQL.test:='Delete from table where ...'; ExecSql; end;
E Expert Unregistered / Unconfirmed GUEST, unregistred user! 2000-11-24 #12 虽然来晚了,但我还是要说你两句:先看看书,再来这里。
H hyoracle Unregistered / Unconfirmed GUEST, unregistred user! 2000-12-12 #13 虽然来晚了,但我还是要说你两句: 我同意seago的做法, 因为TQuery 本来就是动态SQL查询控件
Y yangkee Unregistered / Unconfirmed GUEST, unregistred user! 2000-12-13 #16 虽然来晚了,但我还是要说你一句:先看看帮助,再看看书,还是不行再来这里。
Z zxyfd2000 Unregistered / Unconfirmed GUEST, unregistred user! 2000-12-21 #18 很简单,query设计时,requestlive:=true; 然后,query1.delete;