I've worked at my place long enough, and am familiar with the moronic requests from the end-users who usually don't realize what they truly want. I've learned to politely ask probing questions to minimize my headaches. But this most recent problem boggles my mind.
Someone comes to me saying "Hey there, we have these query results we got from a government website, a bunch of HTML files. Can you convert them to DBF?"
"Sure", says I. But I get the feeling this is not the entire scope of their issue. After looking at a few sample files, I begin my questions.
"Do these have to be in DBF?" They assure me that no other format will work. Not Access, not SQL Server...it MUST be DBF. "What are they being used for?" For use with their software which is known to play very well with DBF files.
No problem, I make a cute little script that reads in the HTML, finds the <table> of data, and makes a pretty DBF file. Which works fine for about 3 days.
They come back saying "Now we need something that will merge the DBFs together". OK my mistake, I overlooked this possibility. Given the nature of their work I assumed they would want individual files for simplicity. So I make a second script that will take the DBFs and do some simple SELECT and INSERT statements to make one big DBF. This works for another 3 days.
They come back reporting some errors to me. Apparently the query results don't necessarily produce the same column output every time. A few of the files have columns that no others have, and this crashes the script. I try to figure out what kind of a system produces these results, but it doesn't matter. I have to find a way around this. DBFs don't like to be changed once created, so I come up with an elaborate third script that ... well, I'll skip the ugliness and just say that it works.
Not that they use it. Instead they prefer to use Excel to copy and paste data, create new columns, etc, and then act surprised when their systems don't like the resulting files. This works for another few days.
They come back with a new error message. From what I can determine, their merged DBF has gotten too large, too many fields that all end up being CHAR(250) to potentially hold the rare text strings that push the limits of DBF. I found out how to make MEMO fields, but at this point it's a waste of time to have them go back and redo everything.
And the icing on the cake... "Now we want to convert this DBF to an Access database". Two weeks of work, numerous rewrites (with some of the more annoying requests edited out to keep the story somewhat short), a handful of ugly scripts, all for the end result of a format that I could have converted the HTML to with no data loss or funky error messages.
That thumping sound? It's just me, slamming my forehead into the desk.