Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 2 of 2 total |
Can't change column type in EDB Mgr - I'm getting a headache! |
Mon, Sep 17 2007 5:58 PM | Permanent Link |
Dave Harrison | Does anyone have an aspirin?
I've spent the past 15 minutes trying to get EDBMgr to change a column type from VarChar to Char and I'm going in circles. 1) Wouldn't it be nice if we could just change the column type of an existing column like all other db managers? But EDB complains: 'Only the descruption and/or default expression may be modified for the existing column "First_Name"'. Yes, I know it all has to do with RI, but since the table isn't using RI, why the restriction? 2) So I created a new column "First_Name2" and set its column type to CHAR 15. I then dropped the old column "First_Name" and rename "First_Name2" to "First_Name". Whew! 5 more columns and 10 more tables to go. Boy does my head hurts. 3) I then press Ok and EDBMgr complains :Error #700 An error was found in the statement at line 10 and column 0 (Missing Add, Alter,Drop)" Tim, maybe you should make this a sobriety test for DUI drivers? After a few minutes of this the driver's going to beg for mercy and will insist on being taken away in handcuffs to the local drunk tank. A matter of fact, I feel like a good stiff drink right about now. Dave |
Tue, Sep 18 2007 3:18 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Dave,
<< 1) Wouldn't it be nice if we could just change the column type of an existing column like all other db managers? >> 1.06 will fix this. << Yes, I know it all has to do with RI, but since the table isn't using RI, why the restriction? >> Actually, it doesn't have anything to do with RI, but rather to do with the SQL 2003 standard. There is no provision in the standard for changing the type of an existing column other than by dropping it and re-adding it. << 2) So I created a new column "First_Name2" and set its column type to CHAR 15. I then dropped the old column "First_Name" and rename "First_Name2" to "First_Name". Whew! 5 more columns and 10 more tables to go. Boy does my head hurts. >> Here's a simpler way - just select the column to drop, drop the column, change the type, re-add the column, and then move it to the desired position. However, if you change the column name in the process also, please be aware that the old data will not be moved over during the alter. << 3) I then press Ok and EDBMgr complains :Error #700 An error was found in the statement at line 10 and column 0 (Missing Add, Alter,Drop)" >> Got it. A fix will be in the next release. If you use the steps I outlined above, you should be able to get around this error. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 5, 2024 at 10:18 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |