Damon,
Just some thoughts:
It sounds like the column INVCDATE is in the table you are issuing the
ALTER TABLE command against, and R:Base is checking the integrity of the
entire table definition. I'd do a LIST COLUMN INVCDATE to see if more than
one definition exists for the column (shouldn't be but is possible). You
can't have a column be both defined as, say, a DATE type and as a computed
column or as an alias in an SATTACHed table.
Also, the proper syntax is ALTER TABLE ordentry ADD COLUMN invcdate DATE
Your message omitted the word "column" in the command.
If you find more than one definition for the column, you'll need to correct
the erroneous definition. If you do not find more than one definition, I'd
do the following:
output bs.txt *(my favorite file name)
unload structure
output screen
Then, move your old database to a different location, and:
input bs.txt
If the input succeeds in building the structure without errors, then try
your alter table command and see what happens. If it works, then I'd
suspect corruption in file 1 and would strongly recommend a complete
rebuild of the database. What we do here:
1. SDETACH all SATTACHed tables
2. SDISCONNECT any foreign data sources
3. DROP all views - assumes you have all view definitions in .CMD
files on disk
4. Unload data to a file
5. Unload structure to a file
6. Edit the structure file to put the commands for keys, indexes
and autonumbers into separate files, leaving the pure structure
7. Examine the structure file to see that all the table
definitions are in order
8. Input the structure file
9. Input the data
10. Input the keys, indexes and autonumbers files
11. Then, just for good measure, unload all to a file, move the
database, input the file. Note that this is just a belts and suspenders move.
12. RUN the view definition command files to recreate the views
13. SCONNECT any foreign data sources
14. SATTACH any tables from SCONNECTed sources
This sounds like a lot of work, but we have it automated (one driving .CMD
file to do the whole job). The only difference is that we have stored
copies of the structure definition, the keys and indexes, and a command
file to recreate the autonumbers by selecting the max value, incrementing
it, then issuing the AUTONUM command with the next number specified. You
must remember to rename or move your database elsewhere before beginning
the reconstruction. Obviously you could build your new database elsewhere,
but you must be certain to have the .LOB file in the current directory.
>When trying to add another column with the following command:
>alter table ordentry add chgdate date
>When I execute the command, I get the following error message:
>Error - As column INVCDATE is used in another table, it's type can not be
>redefined (2942).
>INVCDATE is a common column in several tables, but I'm not trying to redine
>it, but it won't save it. Anyone got a workaroung or solution?
>TIA
>Damon
Emmitt Dove
Manager, DairyPak Business Systems
Blue Ridge Paper Products, Inc.
40 Lindeman Drive
Trumbull, CT 06611
(203) 673-2231
[EMAIL PROTECTED]
[EMAIL PROTECTED]