Troubleshooting

From InterBase
Jump to: navigation, search

If you made any typing mistakes when you were entering the domain definitions, you’ll get an error message when you run the Tables.sql script or when you are defining the tables manually. InterBase posts a message.

When executing a script, check the script’s log file for error information. The log file is created in the same directory as the script file. When you are defining tables manually, look in the SQL Output area for more information. The SQL Output area echoes the contents of the script.

In either case, if there were problems with a particular table, the SQL code for that table is followed by an error message such as the following:

Statement failed, SQLCODE = -607
Dynamic SQL Error
-SQL error code = -607
-Invalid command
-Specified domain or source column does not exist

To understand the problem, follow these steps:

  1. Read the error text. In this case, it says that the specified domain does not exist. You probably made an error in typing the domain name.
  2. Click on Domains in the left pane of IBConsole. InterBase displays the names of all domains in the right pane.
  3. You defined four domains by hand: FIRSTNAME, LASTNAME, EMPNO, and DEPTNO. Look for each of these in the list of domains and make sure that their names are spelled correctly. It’s likely that you will find one that is misspelled.
  4. Drop the incorrect domain by entering and executing the following command:
DROP DOMAIN domainname
  1. Recreate the domain using the CREATE DOMAIN statement.
  2. Run the Tables.sql script again. If this isn’t the problem, continue with these steps:
  3. Look right above the message text to see which table has the problem. Note which domains are used in that table. Do they include any of the four domains that you entered by hand?
  4. Click on Domains in the left pane of IBConsole. InterBase displays the names of all domains in the right pane. Right-click on the domain in the right pane and select Properties. Click on the Metadata tab and InterBase displays the domain’s definition in the SQL Output Area.
  5. Compare the displayed definition with the definition given in this document (the one that you typed). Continue checking each of the four hand-entered domains until you find one that has a problem.
  6. Drop the domain as described in step 4 above, and then re-enter it correctly. Run the Tables.sql script again.

Advance To:

Viewing an Object Definition