Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 11 total |
Renaming field in existing table |
Thu, May 24 2007 2:34 PM | Permanent Link |
"Royke" | I don't think this is possible using the EDBManager. We are converting a BDE
application to use EDB, and I am taking the opportunity to make some field names more comprehensible. But after creating the new database, copying all data from the BDE version into the EDB version, and only then discovering that I wanted to change one more field name .. Redo the whole process, or write some one-off code that adds a field under the new name, copy the data across from the field with the old name. A hassle. Is there an easier way to change a field name? (As in the Database Desktop.) RoyJ |
Fri, May 25 2007 3:27 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Royke
DROP and ADD. EDBMan should take care of the data (but back up first anyway). Roy Lambert |
Fri, May 25 2007 10:03 AM | Permanent Link |
"Royke" | "Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:41080227-0F3D-4181-A81E-786B20E113F5@news.elevatesoft.com... > Royke > > > DROP and ADD. EDBMan should take care of the data (but back up first > anyway). > > Roy Lambert That would surprise me a bit. So, I DROP a field 'aaa', then ADD a new field 'bbb', How does EDNMan know that the original 'aaa' data should go into the new 'bbb' field? RoyJ |
Fri, May 25 2007 10:51 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Royke
>That would surprise me a bit. So, I DROP a field 'aaa', then ADD a new field >'bbb', How does EDNMan know that the original 'aaa' data should go into the >new 'bbb' field? No idea - ask Tim he's the one who told me Roy Lambert |
Fri, May 25 2007 12:46 PM | Permanent Link |
Bill Mullen | You will have to execute each statement one at a time.
ALTER TABLE "tablename" Add Column NewColumn VarChar(15); update table "tablename" set NewColumn = OldColumn; ALTER TABLE "tablename" drop column OldColumn; >I don't think this is possible using the EDBManager. We are converting a BDE >application to use EDB, and I am taking the opportunity to make some field >names more comprehensible. But after creating the new database, copying all >data from the BDE version into the EDB version, and only then discovering >that I wanted to change one more field name .. Redo the whole process, or >write some one-off code that adds a field under the new name, copy the data >across from the field with the old name. A hassle. > >Is there an easier way to change a field name? (As in the Database Desktop.) > >RoyJ > |
Fri, May 25 2007 1:46 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Bill
You're right, but I do remember Tim posting to the effect that EDBMan would be altered to sort it out. I know its a problem with RI, functions, procedures, views etc but I do hope he does something. Its a VERY handy feature and will be hard to live without. Roy Lambert |
Fri, May 25 2007 2:08 PM | Permanent Link |
Bill Mullen | No doubt that a simple alter table command that allowed a column to be
renames wouldn't be better, but the OP needs a solution now >Bill > > >You're right, but I do remember Tim posting to the effect that EDBMan would be altered to sort it out. I know its a problem with RI, functions, procedures, views etc but I do hope he does something. Its a VERY handy feature and will be hard to live without. > > >Roy Lambert |
Fri, May 25 2007 2:11 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Bill
Dead right - but every opportunity to remind Tim of useful features like that which are currently missing should be taken <vbg> Roy Lambert |
Fri, May 25 2007 6:08 PM | Permanent Link |
"Royke" | True. For now this helps me out.
RoyJ "Bill Mullen" <noprivateemail@domain.com> wrote in message news:qu8e539cnlc9vj34qve17gggm1qu1fukc7@4ax.com... > No doubt that a simple alter table command that allowed a column to be > renames wouldn't be better, but the OP needs a solution now > >>Bill >> >> >>You're right, but I do remember Tim posting to the effect that EDBMan >>would be altered to sort it out. I know its a problem with RI, functions, >>procedures, views etc but I do hope he does something. Its a VERY handy >>feature and will be hard to live without. >> >> >>Roy Lambert |
Sat, May 26 2007 6:37 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< DROP and ADD. EDBMan should take care of the data (but back up first anyway).>> That's only if you're altering something about the column besides the name, like the type. Changing the name causes EDB to treat the column like a brand new column. -- Tim Young Elevate Software www.elevatesoft.com |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |