I need a second opinion!!!!! - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

I need a second opinion!!!!!

DroopyADroopyA Posts: 175Member
All I need is a simple A or B answer. Unless you can think an a better way... I'm always open to new ideas. I'm not sure which way I should go about doing this. OK here it is:

At one spot in the program I'm developing the user can click between three diffrent tabs on a form. Each tab shows them an option of 21 (on each tab) diffrent Permits they can include with the Permit they are about to print. Now this adds up to 63 diffrent Permits that could (God help us) be included with the users Permit. But we also have an option to save each Permit as a Template and these Add-On Permits need to be saved in the Template as well. Not to mention if the user would like to edit the Template I need to load this information. So now I'm stuck.

A) I could add 63 more fields to the database Table and save the name or - ID number of each Add-on Permit that the user selects. But that seems a little extreme considering that this Add-On Permit thing is an option and is not likely to be used most of the time. Plus the table that this needs to be saved in already has 20 some fields in it.

B) Create a string that holds the ID number of each Permit with a defining sign that signals the end of the ID number. IE: if the user selects the first three Permits then the string would hold something like "-1-2-3". Then I could save this string in three fields (one for each tab) and use the "-" sign in code to load the information from a Template. But this seems like alot of extra code and maybe even more overhead.

Right now I think I'm gonna go for choice B but I figured before I typed a bunch of code I should get a second opinion. So tell me what you think I should do. A) Add 63 fields to a table that already contains 23 fields as it is and take the easy way out. or B) Only add 3 fields to this table and save the selected Add-on Permits ID number as a text field with a defining sign between each number.

Thanks
-N473

Comments

  • GazzaladGazzalad Posts: 85Member
    Hi,

    Point B for me every time...

    As no doubt as soon as you have finished it someone will want another tab or form adding. Once the pain has been done writing the code adding or removing additional forms is easy!

    Good luck!!!

    G
  • MozMoz Posts: 32Member
    : All I need is a simple A or B answer. Unless you can think an a better way... I'm always open to new ideas. I'm not sure which way I should go about doing this. OK here it is:
    :
    : At one spot in the program I'm developing the user can click between three diffrent tabs on a form. Each tab shows them an option of 21 (on each tab) diffrent Permits they can include with the Permit they are about to print. Now this adds up to 63 diffrent Permits that could (God help us) be included with the users Permit. But we also have an option to save each Permit as a Template and these Add-On Permits need to be saved in the Template as well. Not to mention if the user would like to edit the Template I need to load this information. So now I'm stuck.
    :
    : A) I could add 63 more fields to the database Table and save the name or - ID number of each Add-on Permit that the user selects. But that seems a little extreme considering that this Add-On Permit thing is an option and is not likely to be used most of the time. Plus the table that this needs to be saved in already has 20 some fields in it.
    :
    : B) Create a string that holds the ID number of each Permit with a defining sign that signals the end of the ID number. IE: if the user selects the first three Permits then the string would hold something like "-1-2-3". Then I could save this string in three fields (one for each tab) and use the "-" sign in code to load the information from a Template. But this seems like alot of extra code and maybe even more overhead.
    :
    : Right now I think I'm gonna go for choice B but I figured before I typed a bunch of code I should get a second opinion. So tell me what you think I should do. A) Add 63 fields to a table that already contains 23 fields as it is and take the easy way out. or B) Only add 3 fields to this table and save the selected Add-on Permits ID number as a text field with a defining sign between each number.
    :
    : Thanks
    : -N473
    :
    *****************************************8
    Option B definitely ....

    As I understand it you have 63 permits available on 3 standard tabs, and you want users to multi-select permits across all three and then save their selection as a fourth "standard tab".

    I would create a custom tab table and store the sequence of references to the original permits (otherwise you are - as you point out - duplicating the data). First rule of database management - store once, refer often!

    A custom tab table with 21 fields should do the trick ..

    Cheers,
    Moz.
Sign In or Register to comment.