According to Intuit, Error Code C=342 can occur when attempting to open a damaged company file (.qbw) in QuickBooks 2004 or 2005.
To attempt to resolve this error, you’ll need to run the Rebuild Data utility in QuickBooks. Fortunately, in QuickBooks 2004 and 2005, this utility can be run without the company file first being open.
See our related article for more information on rebuilding a company file. The steps outlined in that article won’t match exactly the rebuild procedure for QuickBooks 2004 or 2005, since the rebuild utility is now run from within QuickBooks itself. What the rebuild utility does, however, has remained relatively unchanged.
For more information on the troubleshooting steps to resolve Error Code C=342, consult this Intuit knowledge base article.