Custom Project Tables

You can include custom tables as part of a Cobra project.

For example, you can create a custom table called MYCUSTOM with the following columns:
  • PROGRAM
  • CA1
  • CA2
  • CA3
  • DESCRIP

You can populate the table with data from the project DEMOADV, using this SQL Command query:

SELECT PROGRAM, CA1, CA2, CA3, DESCRIP INTO mycustom FROM CAWP WHERE PROGRAM = 'DEMOADV'

To make Cobra aware of the custom table, add a reference to USERTBLS with this query:

INSERT INTO usertbls (keyfield, tablename) VALUES ('PROGRAM', 'MYCUSTOM')

You can now back up, restore, or copy your project with your custom table data.

Cobra edits the custom table when you use it in the following processes:

  • Backup — When you back up a project, Cobra backs up records with a name found in your custom table.
  • Restore — When you restore the project, data in the custom table with the same name is deleted from the custom table and replaced with data from the backup. If the project is restored with a new name, the custom table is populated with the backup data, using the new project name.
  • Delete — If a Cobra project is deleted, the data in the custom table is also deleted.
  • Save As — When you copy a project using the Save As operation, Cobra checks the USERTBLS table and copies any user table data related to the program being copied.