Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB Tools

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-30-2009, 01:50 PM
avinash.lkr avinash.lkr is offline
Member
 
Join Date: Jun 2009
Posts: 32
Default Repair MS Access Database

Hi I have to repair an access database.

i am using this function to do this

Function CompactAndRepairAccDb(sOldMDB : String; sNewMDB : String) : Boolean;
const
sProvider = 'Provider=Microsoft.Jet.OLEDB.4.0;';
var
oJetEng : JetEngine;
begin
sOldMDB := sProvider + 'Data Source= ' + sOldMDB;
sNewMDB := sProvider + 'Data Source=' + sNewMDB;

try
oJetEng := CoJetEngine.Create;
oJetEng.CompactDatabase(sOldMDB, sNewMDB);
oJetEng := Nil;
Result := True;
except
oJetEng := Nil;
Result := False;
end;
end;

but i am getting an error Unrecognized Database Format.

Is there any other way to repair an access database.
Reply With Quote
  #2  
Old 09-25-2009, 12:56 PM
Robert_Thompson Robert_Thompson is offline
Junior Member
 
Join Date: Sep 2009
Posts: 10
Default

'Compact and Repair Database' on the MS Access menu???
Reply With Quote
  #3  
Old 09-27-2009, 08:54 AM
Davidpoul Davidpoul is offline
Junior Member
 
Join Date: Jul 2009
Location: India
Posts: 3
Default Repair MS Access Database

Try 'Compact and Repair Database' to repair your database. If still you are facing the problem than your need to use Access repair software.
__________________
David Poul
Reply With Quote
  #4  
Old 10-08-2009, 11:08 PM
lenchnikin lenchnikin is offline
Junior Member
 
Join Date: Sep 2009
Posts: 1
Default Repair MS Access Database

Required FixTools for iFix. Easy Database Access EDA for Visual Basic. шланг
Reply With Quote
  #5  
Old 10-09-2009, 07:41 AM
Davidpoul Davidpoul is offline
Junior Member
 
Join Date: Jul 2009
Location: India
Posts: 3
Default RE: Repair MS Access Database

What Mr Robert says is correct. Try compact & repair on MS Access menu. If still you are facing the problem then you need to use third party stellar access recovery software to repair your access database.
__________________
David Poul
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:26 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.