var dbf :integer; begin dbf := OpenBase( 'filename.dbf' ); if dbf <> 0 then begin // some code CloseBase(dbf); end; end.