• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Field length catch - FBN

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
While testing doing FBN I identified a potential problem.
If we have look at the kinda data in the db.db file
I observerd that the Fligt Number can be maximum of 5 characters.
IIIrly origin / destination airport can be max 3 chars.
Now when we add a new flight then should be we set the maxm field length of the text fields based on the lengths of fields.
Anyway when the Data class writes a record using Data Record it will pick up only the maximum length as specified in db.db.
The user is disillusioned as to why the flight no. etc has been truncated if
he enters a bigger value in the test field.
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Akshay
Why are you adding new flights? Is this part of your GUI? I didn't see any requirements for us to add new flights.
You are right though - it would be a good idea to set up entry fields so that users cannot enter data larger than allowable size, plus do data validation during entry where possible, and further checks after entry to confirm the data is acceptable.
Regards, Andrew
 
please buy my thing and then I'll have more money:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic