{"id":127,"date":"2007-01-17T02:47:27","date_gmt":"2007-01-17T07:47:27","guid":{"rendered":"\/cgi\/wp\/?p=127"},"modified":"2019-12-10T17:56:50","modified_gmt":"2019-12-10T22:56:50","slug":"latest-database-work","status":"publish","type":"post","link":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=127","title":{"rendered":"Latest Database Work"},"content":{"rendered":"<p>I&#8217;ve upgraded to Microsoft Office 2007 and discovered that Outlook 2007 can export emails to Access 2007. I don&#8217;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 <strong>Email <\/strong>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 <strong>Body<\/strong> 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 <strong>Body<\/strong> 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.<\/p>\n<p>I&#8217;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 <strong>mysqldump<\/strong>. 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 <strong>mysqldump <\/strong>backup although in this case I was just updating the copy of the database on my system.<\/p>\n<p>Today I learned how to use match collections with regular expressions in ASP.NET. I had some sample code for regular expressions but\u00a0I never worked out how to get a collection of string matches before.<\/p>\n<p>I also installed <strong>OsCommerce <\/strong>on my local web server and worked through various hurdles to get it running. I had to edit my <strong>php.ini<\/strong> file and\u00a0mess 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve upgraded to Microsoft Office 2007 and discovered that Outlook 2007 can export emails to Access 2007. I don&#8217;t think this was possible before. It is certainly useful because a lot of data comes in via email. When you export &hellip; <a href=\"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=127\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/127"}],"collection":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=127"}],"version-history":[{"count":1,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/127\/revisions"}],"predecessor-version":[{"id":3412,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/127\/revisions\/3412"}],"wp:attachment":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}