Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 11 to 15 of 15 total |
TEdit's MaxLength Not Respected |
Wed, Aug 1 2018 11:41 AM | Permanent Link |
Frederick Chin | Raul wrote:
/* So if one were to modify the record and write it back to database would you be OK if it's now truncated to control max length ? */ Yes, why not? As the developer, I set the MaxLength to an appropriate value because it is needed and I am doing so to maintain the correctness of the data written. -- Frederick |
Wed, Aug 1 2018 11:48 AM | Permanent Link |
Raul Team Elevate | On 8/1/2018 11:41 AM, Frederick Chin wrote:
> > Yes, why not? As the developer, I set the MaxLength to an appropriate value because it is needed and I am doing so to maintain the correctness of the data written. > Because now you're putting business logic into the front end so everything that updates that data has to implement all the rules. Curious what Tim says since this does represent interesting conflict. - if EWB app enforces shorter max length than DB then one can truncate data when saving data back that was longer - if EWB app enforces longer max length than then DB will truncate value user entered once record is posted Raul |
Wed, Aug 1 2018 6:31 PM | Permanent Link |
Frederick Chin | Raul wrote:
/* Because now you're putting business logic into the front end so everything that updates that data has to implement all the rules. */ I don't see this as a hindrance if it gets the job done with a simple property change. I'll give you another example. Let's say I am creating an application that will be used in two countries. One country requires the field to be 5 characters wide while another needs it to be 10 characters. If I were to create the table, the field would be 10 characters wide. In the EWB application, I can just set the MaxLength property to 5 for one country and 0 for the other. /* - if EWB app enforces shorter max length than DB then one can truncate data when saving data back that was longer */ Truncation sounds like you are damaging data. It is more like data input validation before the data is saved to the DB. /* - if EWB app enforces longer max length than then DB will truncate value user entered once record is posted */ I doubt that a developer would consciously set a MaxLength greater than the table's field width but the user will complain if their entered data were to be cut off. -- Frederick |
Wed, Aug 1 2018 6:38 PM | Permanent Link |
Walter Matte Tactical Business Corporation | Frederick Chin wrote:
"A simple property change is better than fooling around with the data definition." Setting the length in the Field Definition - it is a Property! I like the framework the way it is. I don't like the Delphi behavour you describe. Walter |
Mon, Aug 6 2018 2:30 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Frederick,
<< Yes, why not? As the developer, I set the MaxLength to an appropriate value because it is needed and I am doing so to maintain the correctness of the data written. >> Some database servers/engines will issue an exception/error if the data is truncated during modification. It's actually in the SQL spec and ODBC spec. As for fixing this issue: is there any reason why you don't just change the length of the TDataColumn instance ? EWB doesn't care, either way, and you can set up multiple datasets that use the same underlying server-side dataset, but each with different field definitions. Tim Young Elevate Software www.elevatesoft.com |
« Previous Page | Page 2 of 2 | |
Jump to Page: 1 2 |
This web page was last updated on Friday, April 19, 2024 at 07:09 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |