VistaDB 5






RepairDatabase() Method
Attempt to repair a physically or logically corrupted database file.
Syntax
'Declaration
 
Public Overloads Sub RepairDatabase() 
'Usage
 
Dim instance As VistaDBConnection
 
instance.RepairDatabase()
public void RepairDatabase()
public procedure RepairDatabase(); 
public function RepairDatabase();
public: void RepairDatabase(); 
public:
void RepairDatabase(); 
Remarks
If PackDatabase cannot update or pack a database file you may need to attempt a RepairDatabase. This function attempts a much lower level repair of the database than a pack operation. All of the high level database constructs like constraints and triggers are ignored during this operation. As a result there still may be logical corruption (Foreign Key Constraints, etc) that are invalid after this operation completes. You must then run PackDatabase to validate the logical portions of the database. This method does not guarantee database schema and data to be accurate after a repair. Repair is a best effort attempt to get as much data back out of a database as possible. It is not recommended you automate this call without user interaction. The schema and data should be verified after running a repair operation.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also