VBScript again

| No Comments | No TrackBacks

Every year my school puts out what it calls the redbook. This is a spiral bound book with things like a calendar, codes of conduct and directories. My main contribution is the directory, which basically a phone book for students and their parents. This summer we upgraded our main business logic app which controls or grades and admissions. This meant that I need to upgrade my script which massaged the output from the new system into the phone book like directory.

The trick this year was that the new system changed the way it outputed address and contact number info. It has taken me a week or so to even determine how to get what I want out of the database. There may be a better way but I can't find it. In this process the export file I dealt with grew from 80 fields per student to over 200. Also before when I did the export I knew which fields contained fathers, mother, stepfathers or stepmothers. I no longer know this. This meant I had to write code as a front end to my previous code to just determine which of the 1-4 parents were which.

I was able to do this mostly by doing some array mapping and churning. I look at certain fields to determine who is who. Then I walk through the array to see which of the possible 15 contact fields are the 3-4 I care about. Lots of fun let me tell you. However I have an even greater respect for the simplicty and power of VBScript. Sure there are fancier languages and it can't work efficently on GB's worth of data, but for walking through a 1 MB text file and doing lots of rearranging it works great. I highly recommend learning it if you do anything in the windows admin space. It also has great hooks into Active Directory as I mentioned in a previous entry.

No TrackBacks

TrackBack URL: http://www.hoyty.com/MovType/mt-tb.cgi/58

Leave a comment

About this Entry

This page contains a single entry by Brian Hoyt published on June 24, 2004 7:16 PM.

Server crash? was the previous entry in this blog.

Max Payne 2 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.