请给出代码!

解决方案 »

  1.   

    dim cn as new adodb.connection
    dim i as long
    cn.ConnectionString = "PROVIDER=MSDASQL;DRIVER={Microsoft Visual Foxpro Driver};SourceDB=" & App.Path + "\;SourceType=dbf"   '当前目录自由表
    cn.open 
    cn.Execute "create table text(col char(10))"
    for i=0 to 100
        cn.Execute "insert into text values('row' & i)"
    next
    cn.Execute "delete from test"
    cn.close
    你自己测试吧。
      

  2.   

    kill xxx.xx   这个彻底
      

  3.   

    网上搜一下   一大把    
    关键字推荐:真正删除DBF表记录
    http://www.pyjxx.net/list.asp?id=102
      

  4.   

    或者缺省情况下,VB 删除记录只是把记录作上个删除标志而已,并没有真正删除。要真正删除记录,你可以使用 VB 提供的以下方法:BeginTrans、CommitTrans、RollBack。其中,BeginTrans 方法开始记录数据库的变动,CommitTrans 方法确认数据库的变动,而 RollBack 方法则可以恢复被删除或修改的记录。它们可以嵌套使用。因此,要恢复被删除的记录,应该在使用 BeginTrans 方法之后及使用 CommiTrans 方法之前使用 RollBack 方法
      

  5.   

    select * into newtable from table where 1=2 kill app.path & "\table.dbf"
    filecopy  app.path & "\newtable.dbf", app.path & "\table.dbf"