Latest Database Work

I’ve upgraded to Microsoft Office 2007 and discovered that Outlook 2007 can export emails to Access 2007. I don’t think this was possible before. It is certainly useful because a lot of data comes in via email. When you export an Outlook folder to Access it will create a table named Email containing the fields; Subject, Body, FromName, FromAddress, FromType, ToName, ToAddress, ToType, CCName, CCAddress, CCType, BCCName, BCCAddress, BCCType, BillingInformation, Categories, Importance, Mileage, Sensitivity. Most of the data you want will be in the Body field so it will be necessary to extract text from that memo field. I had an Outlook folder for bounced email messages and I wanted a list of the email addresses that could only be found in the Body field. In order to get the email addresses from that field, I wrote a script to loop though the records. I used a regular expression to find the text that matched the email address format and then wrote that string value to a text file.

I’ve also been doing more work with MySQL because it is more affordable than SQL Server. I recently created a batch file to automate a MySQL backup using mysqldump. The most difficult aspect of the batch file was appending the current system date to the file. Fortunately I found some sample code on the Internet that returns the system date in a valid format for file names; with dashes rather than backslashes. I then created a scheduled task to run the batch file. I also learned how to restore a MySQL database from a mysqldump backup although in this case I was just updating the copy of the database on my system.

Today I learned how to use match collections with regular expressions in ASP.NET. I had some sample code for regular expressions but I never worked out how to get a collection of string matches before.

I also installed OsCommerce on my local web server and worked through various hurdles to get it running. I had to edit my php.ini file and mess around with file permissions and directory file paths. I documented all the necessary steps, fixes, and work arounds for future reference. OsCommerce is a free shopping cart web application which I frequently recommend to my clients but I have not been asked to customize it yet.

This entry was posted in General. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit exceeded. Please complete the captcha once again.