Posted by Sue Sloan on May 01, 2004 at 09:47:12:
In Reply to: Product Sales report error posted by Butch Bernhardt on April 30, 2004 at 13:07:36:
: We are getting an error message when trying to print a Product Sales report. The message states "Someone locked the record in the database products.dbf. Try again?" The Retry and Cancel buttons bring the same message, so we have to close the program using Task Manager.
: The error only comes up for the current month of April. If we choose the Previous Month prompt, it will generate a March report. We get the same error message with the Monthly Sales by Source report, the Annual Sales Totals by Product and the Annual Sales by Source. All the other reports, Monthly and Annual, continue to work fine.
: One possible source of the problem: We installed a new server in April and transferred the entire folder to the new server, under the same disk letter. I assume everything was transferred properly, but that may not be the case.
Well, it sounds like the products database is the core of the problem, but we rarely (almost never) encounter problems with that one. I suspect a duplicate product number has been created, although that is hard to do within ODP.
Here are some things you can do. You will need to be the only person in ODP and enter with the Design Password.
1) Check for duplicate product numbers, which are not allowed:
* Go to the worksheet menu and display the Products Worksheet. * Under Worksheet on the top menu bar, select Find, then Find Assistant.
* On the first page, change the "Type of find" to "Find duplicate records".
* Click Next.
* Select the PRODNUMBER field and the Add button.
* Click Done.
If any duplicates are found, you must change the prodnumbers to be unique or delete the duplicate and leave only one of them.
2) Compress the database to rebuild the index which could be "corrupted":
* Go into Design Mode (Ctrl+D) on any view.
* Click File on the top menu bar, then User setup, then Approach Properties.
* Go to the tab marked "Database".
* Select in the top field the products database and click the Compress button.
* Just in case, then select the ordetail database and the Compress button.
* Then click the OK button.
When Approach is finished with the process, you will be back on the screen where you started.
At this point check to see if the problem has been resolved. If so, you do not need to do any more of these things.
3) Create a new products database:
* Go to the worksheet menu and display the Products Worksheet. * Under File on the top menu bar, Export Data.
* Position yourself in the production ODP folder first.
* Then type in a name for the exported product file --- TempProd is a good one.
* In the Database Fields area select each of the fields and the Add button. Stop when you get to "CustNumSave" in italics and do not export that one.
* Click the Export button.
* Exit ODP.
* Use the Windows Explorer to rename the files named products.dbf, products.dbt and products.adx to oldprod.dbf, etc.
* Now rename the TempProd files to products.dbf, products.dbt and products.adx.
Test ODP again to see if things are OK. If not, let me know and we will explore it further. Also check the ODP folder for any files with a type of OYZ. If there is one, post the name of that file so we can fix the problem.
Sue Sloan