One of the (many) good things about R:Base is that there is (nearly) always a 
way to do it – whatever the β€œit” may be.

The only (usual) problem is finding the way...


Regards,
Alastair.



From: Albert Berry 
Sent: Wednesday, June 08, 2011 5:42 PM
To: RBASE-L Mailing List 
Subject: [RBASE-L] - Did a stupid, but fixed it. 9.1 (64)

I was pounding away on my keyboard, modifying a particular module in a 
database I am working with. I had declared and opened a cursor while 
testing forms and procedures for "Table1".

SET STUPID USER ON
-I did not drop the cursor.
-I did not back up the database
-At the R> prompt I did ALTER TABLE Table1 ADD SortOrder INTEGER.
- got an error message
- Again, ALTER TABLE Table1 ADD SortOrder INTEGER
- got an error message again
- EDIT USING Table1_Form
- Form won't work, and tells me some columns are missing in designer.
- LIST TABLES gave me three tables named Table1
- LIST Table1 stops at column 10 which has no name, and there are no 
rows in Table1
- Reloaded, unloaded and loaded, no go. Still three tables with the same 
name, but different sys_table_IDs
- After an hour or so, figured out how to fix it.

For anyone who is as stupid as I am, when you get three tables with the 
same name, this worked to fix it. I had several copies of the database 
by now, but made another one anyway.

- Find which table is correct.
R>sele * from sys_columns where sys_table_id = 40
R>sele * from sys_columns where sys_table_id = 49
R>sele * from sys_columns where sys_table_id = 50 < correct column list
- Rename the other two copies of the table in the table designer
- List Table1 and it looks good again!
- Drop the two renamed bad copies
- Forms and Reports are pointed to one of the bad tables, so
- Rename the forms and reports, then
- Copy the forms and tables back to their original names and select the 
table you just fixed.
- It worked!!!!!!

I would have saved myself a lot of time by doing this first:
RELOAD DBSave

Albert the Dummy

Reply via email to