Hi Loay,
I had a similar problem with a Smartware db file and did the following to 
unlock the db file. Don't know if it will help but might be something that you 
could use to develop your own code to at least check or reset the bits so as to 
open and export per your needs???

const
  fFixDB:Array[1..4] of byte = (0,0,0,0);
  fLockedDB:Array[1..4] of byte = (255,255,255,255);

{----------------------------------------------------------------------------}
function TForm1.UnlockDB(FileName:String):Boolean;
var fFileH,I: Integer;  B:Boolean;
begin
   B:=False;
   if FileExists(FileName) then begin
      fFileH:=FileOpen(FileName,fmOpenReadWrite);
      if fFileH>0 then begin
         FileSeek(fFileH,20,0);
         I:=FileWrite(fFileH, fFixDB, 4);
         if I=4 then //Ok
         else
         if fException=True then begin
            Raise Exception.Create('Cannot UnlockDB');
         end;
      end;
      FileClose(fFileH);
      B:= NOT IsDBLocked(FileName);
   end;
   UnLockDB:=B;
end;
{----------------------------------------------------------------------------}

Cheers,
Charlie

  ----- Original Message ----- 
  From: Loay Habash 
  To: [email protected] ; Greatis Delphi Pages 
  Sent: Saturday, February 24, 2007 6:38 AM
  Subject: [delphi-en] DBase III to Delphi




  Hello,
  I need to migrate dbf files from an old application to another db format, 
From old application built on clipper dbase III, the problem you can't open the 
file directly by the "Databse Descktop" error "unable to open table, corrupt 
table/index header", but first you need to open it by Dbase "DBU.EXE" , and it 
should be file by file,�� then you can open it with "Database Desktop",�. 
After investigation about why is that I new that there is exclusive table lock 
by the application,â?¦..
  So how can I write a procedure that will unlock all the tables before doing 
the migration,â?¦.
  Thank you 


  Loay Habash, 
  http://groups.yahoo.com/group/WeLoveYouAll/ 
  http://profiles.yahoo.com/leohabash 
  [EMAIL PROTECTED] 
  Mobile: +966503322315

  ---------------------------------
  Want to start your own business? Learn how on Yahoo! Small Business.

  [Non-text portions of this message have been removed]



   

[Non-text portions of this message have been removed]

Reply via email to