提交了没有?如post或applyupdate.

解决方案 »

  1.   

    通常你的删除只会给记录打上删除标记,没有真正删除。想真正删除调用BDE的函数:
    function DbiPackTable (hDb: hDBIDb; hCursor: hDBICur; pszTableName: PChar; pszDriverType: PChar; bRegenIdxs: Bool): DBIResult stdcall;这是函数原型。这是永久删除记录的唯一办法。
    参数的说明:
    ParametershDb  Type: hDBIDb  (Input)
    Specifies the valid database handle.
    hCursor  Type: hDBICur  (Input)
    Specifies the cursor on the table to be packed. Optional. If hCursor is specified, the operation is performed on the table associated with the cursor. If hCursor is NULL, pszTableName and pszDriverType determine the table to be used. 
    pszTableName  Type: pCHAR  (Input)
    Pointer to the table name. Optional. If hCursor is NULL, pszTblName and pszTblType determine the table to be used. (If both pszTableName and hCursor are specified, pszTableName is ignored.) If pszTableName is a fully qualified name of a table, the pszDriverType parameter need not be specified. If the path is not included, the path name is taken from the current directory of the database associated with hDb. pszDriverType  Type: pCHAR  (Input)
    Pointer to the driver type. Optional. This parameter is required if pszTableName has no extension. The only valid pszDriverType is szDBASE.
    bRegenIdxs  Type: BOOL  (Input)
    Specifies whether or not to regenerate out-of-date table indexes. If TRUE, all out-of-date table indexes are regenerated (applies to maintained indexes only). Otherwise, out-of-date indexes are not regenerated.
      

  2.   

      举个例子:
    uses
      bde;
    ......
    try
      table1.close;
      table1.exclusvie:= true;
      table1.open;
      check(dbipacktable(table1.dbhandle,table1.handle,nil,nil,true));
      table1.close;
      table1.exclusive:=false;
    finally
    ....