1 - launch iPhoto with the Command+Option keys depressed and follow the instructions to rebuild the library. Select all options.
2 - rebuild the library using iPhoto Library Manager as follows:
Using iPhoto Library Manager to Rebuild Your iPhoto Library
1 -Download iPhoto Library Manager and launch.
2 -Click on the Add Library button, navigate to your User/Pictures folder and select your iPhoto Library folder.
3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File->Rebuild Library menu option
4 - In the next window name the new library and select the location you want it to be placed.
5 - Click on the Create button.
Note: It may take some time to create the new library if you have a lot of photos.
3 - start over with a new library and import the Originals folder from your original library as follows:
Creating a new library while preserving the Events from the original library.
Move the existing library folder to the desktop. Open the library package like this. Launch iPhoto and, when asked, select the option to create a new library. Drag the Originals folder from the iPhoto Library on the desktop into the open Photo window
This will create a new library with the same Events as the original library if you have the Finder checkbox unchecked in the Events preference pane.
Also the following tip is a way you can recover from this type of database file damage in the future. You must have to make frequent backups of the dB file.
TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.≤br>
Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.
