A couple of things happen when you rename columns.

If you do not use the nocheck option, R:base will go and modify your forms
and reports to reflect the new name.  Now you have you are going to have a
relationship problem between the 2 tables because the form gets modified and
the fields are no longer named the same.  In theory when you do the second
rename, it should fix the relationship problem in the forms.

If you use the nocheck option, R:base does not modify your forms and
reports, so when you do the second rename, everything will be like new w/o
R:base messing with your forms at all.

My guess is that this option may have been used inconsistenly during the
renaming process, or you found a bug relative to form table relationships
and renaming columns.  I don't know that it would really be a bug because if
you used the NOCHECK option, this would not be an issue.

Double check your tables and make sure the column names and definitions are
the same in both tables.

You might need to go in and modify the form and save it again to get the
tables linked.

Another thing R:base does in forms is automatically link ALL fields between
tables in the form with fields of the same name.  Did you change the names
of anything else when you were making these changes?

Troy

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Brad
Davidson
Sent: Wednesday, July 16, 2003 1:00 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Redefining column when column exists in
multiple tables


Alastair, David -

Have performed such column size changes in order without incident, until
today!
Other than dropping and re-creating indexes for the column in 5 of 12 tables
(remaining tables subject column not indexed), there's no change to the
procedure submited.  HOWEVER, I have a 2 table form in RBase 6.5++ for DOS
that
isn't working correctly, and heck if I can find out why.

After changing column size for column (PN) per above, then going to form
INV,
clearing, then re-placing resized field in master table (INV), then exiting,
saving and entering form via application program, all related data from
bottom,
slave table (POLINE)  is missing. There are no eeps to the revised field
(PN)
and nothing else revised in form. Yes, field order has been re-set to
original.
Other than simply 'stretching' the size of column PN from 20 to 23 - no
other
changes have been made, yet the loss of related data in slave table. Common
column to both tables IS (PN).

Any suggestions on what I'm not doing right is appreciated - TIA!

Brad Davidson

"David M. Blocker" wrote:

> CHeryl
>
> Lets say you want to redefine MyCol TEXT 6 to MyCol TEXT 12
>
> Lets say it appears in tables DAVID and CHERYL
>
> Let's say it appears in the computed column MyCompCol in both tables as
> MyCompCol=(MyCol&LastName) TEXT 20
>
> Here are the steps:
>
> AUTOCHK the database and back it up
>
> -- Remove computed column definition temporarily in
> --CHERYL
> ALTER TABLE CHERYL ALTER COLUMN MyCompCol TO MyCompCol TEXT 20
>
> --Temp rename MyCol to MyCol1 and change size in
> --CHERYL
> ALTER TABLE CHERYL ALTER COLUMN MyCol TO MyCol1 TEXT 12
>
> -- Remove computed column definition temporarily in
> --DAVID
> ALTER TABLE DAVID ALTER COLUMN MyCompCol TO MyCompCol TEXT 20
>
> --Do the permanent redefine in DAVID
> ALTER TABLE DAVID ALTER COLUMN MyCol TO MyCol TEXT 12
>
> -- Put back computed col definition in DAVID
> ALTER TABLE DAVID ALTER COLUMN MyCompCol to MyCompCol=(MyCol&LastName)
TEXT
> 20
>
> --Rename back to original name in CHERYL
> ALTER TABLE CHERYL ALTER COLUMN MyCol1 TO MyCol TEXT 12
>
> --Put back computed col definition in CHERYL
> ALTER TABLE CHERYL ALTER COLUMN MyCompCol to MyCompCol=(MyCol&LastName)
TEXT
> 20
>
> Now you'll need to PACK the database, check it again and back it up.
>
> David Blocker
>
> ----- Original Message -----
> From: "McClure, Cheryl" <[EMAIL PROTECTED]>
> To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, July 16, 2003 12:51 PM
> Subject: [RBASE-L] - Redefining column when column exists in multiple
tables
>
> > Running current Windows 6.5 version of R:BASE:  I need to change a text
> > column in a table from 6 characters to 12 characters.  This column
appears
> > in more than one table and is used in a computed column.  I know there
is
> > some sort of round robin type method to change the column, but the
details
> > have slipped my mind.  Could someone refresh me please?
> >
> > Thanks!
> >
> > Cheryl McClure
> > CDC
> >
> >

Reply via email to