Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Bob Swart (aka Drs.Bob) Dr.Bob's Delphi Clinics Dr.Bob's Delphi Courseware Manuals
View Bob Swart's profile on LinkedIn Drs.Bob's Delphi Notes
These are the voyages using Delphi Enterprise (and Architect). Its mission: to explore strange, new worlds. To design and build new applications. To boldly go...
Title:

Resizing Comments Field Length

Author: Bob Swart
Posted: 8/26/2005 6:12:08 PM (GMT+1)
Content:

I'm afraid I think I found a minor bug in ECO II. Not a biggy, but still an unexpected one. See QC #15457 for my report.

As you may know, I've been working on this weblog application (you're looking at it!), and one of the things I promised readers to fix was a change of the default string length for Comments from 255 to something like 2048.
However, when I changed the Length field in the CoreClasses Model Designer and saved (and even recompiled) the project, this change was not detected by the "Evolve Schema" button. It kept telling me "No action needed"...

To get the model field length and the database field length in sync, I will need to do a "manual" ALTER TABLE on the SQL Server / MSDE database to physically change the Comments field from a VARCHAR 255 to a VARCHAR 2048 as well.

I realise that changing the length of a string field isn't really a change of the model per se, but it is a change of the database schema. So but unlike adding an operation which indeed doesn't yield a new database schema, I would expect a field length change to result in a new database schema, with an ALTER TABLE.

In short: it took a little bit longer before the comments were enlarged ;-)

Back  


2 Comments

AuthorPostedComments
Bob Swart05/08/26 20:39:33Comment fields have been adjusted to max. 2048 characters (both in the model and in the SQL Server / MSDE database)...
Jonas Hogstrom05/09/07 11:23:56Yes, it is a bug, and I take full responsibility... We are looking into getting this fixed for EcoIII (or atleast detected so a warning can be issued). The problem is that the change can not be done inplace in many databases, thus requiring the addition of a temp-column, moving of data, dropping and recreation the original column (with the correct length) and then moving the data back again. Not impossible, but rather messy. Eventually this bug will be fixed, but I can't promise when.


New Comment (max. 2048 characters, no HTML):

Name:
Comment:



This webpage © 2005-2014 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.