×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Basic Enum questions

Basic Enum questions

Basic Enum questions

(OP)
Hi,

From what I've read, I'd like to utilize Enums to keep track of columns in an Excel spreadsheet that's used to import data into a database. The company supplying the spreadsheet has had a penchant for changing, adding and deleting columns over the last couple of years. It's become a nightmare to recode the data import routine.

What I'd like to know is once I've established the Enums for the columns, if a column is added, I know I have to add that column to the Enum collection. If that column is added somewhere within the existing columns changing the column numbers of all that follow, do I physically have to reassign the column numbers following the added column? Or does that happen automatically once I tell the collection what the new column number is?

And if I put the Enum collection in its own Module in the DB, would there be a way for me to automate changes to the collection through a form the user can access?

Thanks,
Vic

RE: Basic Enum questions

Hi,

If the text file you get does not have consistent 1) column names/data types/position left to right, 2) missing column names or 3) new column names you have a real tripple nightmare.

Short of comparing a list you maintain with the imported columns for existence, data type & position, I don’t know what you could programmatically do with certainty.

But I don’t know the specifics. You’ve posted no examples of the kinds of anomalyies you can expect, and therefore program for, so what happens in vagueness stays in vagueness.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Basic Enum questions

(OP)
Thanks Skip.

I'll just have to have the user check the columns to make sure the titles, positions and types are correct before processing the import.

Vic

RE: Basic Enum questions

If you can send them a template to fill in, you could set headers and protect worksheet with adding/deleting columns disabled (one of protection options).

combo

RE: Basic Enum questions

Or you can check that the document is in the correct format before processing and alert the user if there is a problem.

RE: Basic Enum questions

(OP)
combo
Thanks for your suggestion. Unfortunately, the company supplying the spreadsheet data is privately owned and doesn't respond to inquiries. From their perspective, supplying the data is a necessary evil and they'll do it any way they choose.

DjangMan, that's what I think I'll have to do in this situation.

Thanks folks,

Vic

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close