A "7180: Could not find template data." Error Occurs When Opening Documents or When Viewing Fields.

April 19, 2004 | KB: 1000501
Laserfiche 6, Plus 6

Summary

When you open a document or view a field, you may receive the following error message:

    7180: Could not find template data.

Cause

This error most commonly occurs after migrating the database. An error occurred during the migration process and one of the TD tables migrated with an incorrect column name. The TD table should have a column named TocId instead of Id.

Resolution

Rename the Id column of each TD table to TocId. This can be accomplished using either Enterprise Manager or the OSQL command line utility. Perform one of the following methods:

Note: Enterprise Manager is only available if you have the full version of Microsoft SQL Server. If you are using MSDE, perform the second method involving the OSQL command line utility.

To rename the Id column using Microsoft SQL Server Enterprise Manager:

  1. Click Start, then select All Programs.
  2. Select Microsoft SQL Server and click Enterprise Manager.
  3. Expand Console Root.
  4. Expand Microsoft SQL Server.
  5. Expand SQL Server Group.
  6. Locate and expand the server the database resides on.
  7. Under the Databases folder, locate and expand the correct database name.
  8. Under the database name, click Tables.
  9. In the right side view pane, scroll down and find all the TD tables, for example: TD1, TD2, and so on.
  10. Click on TD1 and from the Action menu, click Design Table.
  11. Rename the first column name (currently named Id) to TocId.
  12. Close the Design Table dialog box and click Yes when asked to save the changes.
  13. Repeat steps 10-12 for any additional TD tables.

To rename the Id column using the OSQL command line utility:

  1. Click Start and click Run.
  2. Open a command prompt window by typing in the following in the Run dialog box:

    cmd

  3. Click OK.
  4. In the command prompt window, type the following line to start the OSQL utility:

    osql -E -S ComputerName\LaserFiche -d "Database_Name"

    Note: If you are using LaserFiche United (Standard\Enterprise), then you should only specify the name of the computer where the SQL server resides.

  5. Type the following to get a listing of all the TD tables in your LaserFiche database:

    SELECT TableName FROM TSTR
    GO

    Take note of all the TD tables returned.
  6. Type the following to rename the ID column in the TD1 table to TocId:

    EXEC sp_rename 'TD1.[Id]', 'TocId', 'COLUMN'
    GO

  7. Repeat step 6 for any additional TD tables.