Feb 11

Migrating BlogEngine.NET Posts to WordPress with Translations Using Microsoft Access

Migrating Our Site from BlogEngine.NET

We could have started our new blog from scratch but since our existing blog existed for many years, we wanted to migrate it with all the comments from our BlogEngine.NET host to WordPress. That turned out to be a tricky process but we managed to do so. To help others who might be facing the same situation, here are the steps we followed so you don’t have to make the same mistakes we did:

Prepare the Existing Blogs for the Migration

The first step is to make sure your existing BlogEngine.NET blog is working properly and ready for export. One of the tricky and time-consuming parts of this is the reference to graphic files. BlogEngine stores its embedded graphics in its own structure using syntax similar to this (our blog was in the BLOG folder):

src=”/blog/image.axd?picture=banner.jpg”

Note that this only impacts graphics that were uploaded into BlogEngine. If you referenced images that already existing on your website, those references are fine and do not need to be modified.

To fix the image.axd? references and eliminate future dependencies, it’s best to store these graphics in your website explicitly. Once you save the graphic files, you can update your blogs to reference them. Saving the individual pictures is a manual process and you’ll need to decide where to store them on your website. You can then manually update the affected blog topics. Alternatively, you can do a search and replace later after exporting the blog’s XML file. We did a combination of both.

Export the existing BlogEngine.NET data to an XML file

Export the existing BlogEngine.NET data to an XML file. This is available as the last option under Settings from BlogEngine. The default name is BlogML.xml

Unfortunately, even if you fixed the picture image references, you’ll still need to translate the file to a format that WordPress can import. That requires making many changes. We actually exported the XML file, then parsed it to find the references to

src=”/blog/image.axd?

to identify any image references that were still in BlogEngine. That gave us the choice to either fix the original blog and re-export, or to fix it directly in the XML file.

Preparing WordPress

The WordPress import tools are under Tools, Import. To import the BlogML file, you need to install the appropriate WordPress PlugIn. The BlogML plugin that worked for us was BlogML-WordPress-Import.zip which can be found here. You’ll need administrator write rights to your WordPress folders to install this.

Before you modify the BlogML file, you may want to import it to see the problems that need to be addressed in WordPress. You can do so and trash them in WordPress without any harm.

Using Permalinks with Post Names

By default, WordPress saves and displays its posts by ID number in the URL. If you want posts to have more meaningful names which also helps with SEO, you should set the preference under Settings, Permalinks, and choose Post. We set this but the pages triggered a 404, Missing File problem.

We discovered that this translation didn’t work on our WordPress host (Windows using IIS) unless we added a web.config file in the root of the blog with this information:

<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Translating the BlogXML file with Microsoft Access

Now that we established the foundation to import the XML file and display the posts with the proper Permalinks, we could see several things still need to be fixed. It was relative easy to do with multiple search and replace terms. We did this in Microsoft Access:

  • Create a table with two text fields. One for the Original value and one for the New value to replace it. We then populated the table with the terms to translate:
    • Hyperlink references. Since we migrated our blog from a subfolder (www.fmsinc.com/blog) to its own subdomain (blog.fmsinc.com), we needed to modify all the hyperlink references that were pointing to our web pages to explicitly point to our www.fmsinc.com web site. That meant, we needed to adjust our href=”/ syntax to “href=”http://www.fmsinc.com/”, so we added these two values to our table.
    • Existing Image references. Similarly, we needed to adjust our image src=”/ references for graphic files to “src=”http://www.fmsinc.com/”, so they were added. Note, we didn’t search for “img src”  because many references included style settings between the “img” and “src”.
    • New Image references. This is also the time to add any explicit image.axd? references to the new location of the graphics if you didn’t want to manually edit the original posts.
  • Total Visual SourceBookBlogEngine saves category names as GUIDs and references the GUIDs in each post. If you don’t translate these, they’ll be imported into WordPress with the GUID rather than readable category name. We used the CXMLSettings class from Total Visual SourceBook to read the categories section of the XML file so we could pair the GUID and category names.
  • Perform the Search and Replace
    Once the table contains all the terms to translate, we wrote a simple routine to read the XML file into a variable, then go through the table and use the VBA REPLACE function for each record. When we were finished, we wrote the text to a new XML file for WordPress to import.
  • From WordPress, import the new file using the BlogML import plugin.

Because we programmatically perform the translation process, it was easy to test, run, and refined the entire process when things didn’t work correctly. It took us a few iterations but we were pleasantly surprised how well the posts came across.

We found that we needed to manually touch up some of our posts. The HTML in WordPress doesn’t require the use of paragraph styles (<p> </p>) to define each paragraph and automatically strips them out. Unfortunately, it displays the line breaks in paragraphs which is normally ignored in HTML syntax. We had to manually edit and delete those so the posts properly word-wrapped.

Dec 31

Total Visual CodeTools 2010 Updated for Microsoft Access Office VBA and Visual Basic 6

Microsoft Access 2010 VBATotal Visual CodeToolsMicrosoft Access VBA, VB6 Module Coding ToolsModule Code Cleanup and Builders

Visual Basic 6An update of Total Visual CodeTools 2010 is released with support for Microsoft Office/Access 2010, 2007, 2003 and Visual Basic 6.0. Several enhancements were made to improve the New Procedure Builder, VBE color scheme builder, icons for the toolbars, setup program and IDE integration, etc. Here are the details on the latest enhancements of Total Visual CodeTools.

Total Visual CodeTools is an add-in to your Office/Access/VBA and VB6 integrated development environment (IDE) that helps you write, clean-up and deliver better solutions. Available from the IDE menu or a toolbar, a variety of tools help increase your efficiency and consistency when writing code and taking over someone else’s work. Features include:

  • Code Builders to create new procedures, properties, ADO and DAO recordsets, message boxes, select case statements; convert SQL strings, copy control event procedures, use the Format and DateDiff functions, comment blocks of text, etc.
  • Cleanup Existing Module Code by adding Option Explicit, standardizing formatting, adding error handling to procedures that lack it, rename variable names to your convention, etc.
  • Deliver Modules with Line Numbers plus obfuscation
  • Find Unused Variables to pinpoint unnecessary code
  • Macro Recorder for playing back keystrokes while editing

Registered customers should have received email notification with download instructions of the update.

Dec 26

Total Access Statistics Update for Microsoft Access 2010, 2007, and 2003

Microsoft Access 2010

We are very pleased to release an update to Total Access Statistics for Microsoft Access 2010, 2007, and 2003. If you are an owner of version 14.0, 12.8, and 11.8 respectively, you can download the update at no charge.

Total Access Statistics is the most popular data analysis program for Microsoft Access. It extends the data analysis capabilities of Access queries to let you perform advanced numerical analysis on your data. Use any Access table, linked table, or query to perform calculations such as percentiles, regressions, frequency distributions, t-Tests, correlations, non-parametrics, rankings, moving averages, etc. It can also perform data normalization and let you select random records. As you would expect in a query, you can specify Group By fields so analysis is performed on each set of records with identical group fields. Total Access Statistics runs within Access with all output in Access tables. It supports MDB, ACCDB, and ADP databases.

The update includes these enhancements:

  • Significant performance improvements when processing large numbers of records
  • While analyzing records, a new status form appears with an option to cancel the process
  • Setup program offers machine or current user installation options
  • Resolves all known issues

For additional information, visit the Total Access Statistics Update page.

Dec 19

Microsoft Security Update KB2753842 Problem with Windows OpenType Compact Font Format (CFF) driver

On December 11th, 2012, Microsoft released this security update (KB2753842): MS12-078: Windows OpenType Compact Font Format (CFF) driver.

This patch is causing certain programs to break. The Microsoft KB article acknowledges:

We are aware of issues related to OpenType Font (OTF) rendering in applications such as PowerPoint on affected versions of Windows that occur after this security update is applied. We are currently investigating these issues and will take appropriate action to address the known issues.

Well, it impacts more than PowerPoint. If your applications are suddenly experiencing failures, try removing this update to see if it makes a difference. It can be removed from the Control Panel, Add or Remove Programs, under Updates.

Here’s a Microsoft thread about the issues people have encountered.

Here’s another discussion from Utter Access that includes instructions for uninstalling the update.

Oct 22

Microsoft LightSwitch Application Development with SQL Server

Microsoft LightSwitchMicrosoft Visual Studio LightSwitch for Microsoft Access, SQL Server, and Visual Studio .NET Database Developers

The Visual Studio team has introduced a development platform called LightSwitch which simplifies the creation of database applications in Visual Studio. This rapid application development environment lets you create solutions that can be easily deployed on Windows or Mac platforms from a public web site or Intranet.

We’ve been using LightSwitch for the past year and find it to be ideal for a particular class of SQL Server based solutions. Here our first article providing an overview of the benefits and limitations of the LightSwitch platform for the Microsoft Access community. The paper includes:

  • Sample screens
  • The Visual Studio .NET Platform
  • Working with SQL Server and SQL Azure
  • Rapid Application Development
  • Silverlight Dependency and Limitations
  • Supporting Windows, Mac, and Web Browsers
  • Future Support of HTML5
  • How Microsoft Access Applications can Evolve into LightSwitch

If you’re interested in learning more about our help developing custom solutions based on LightSwitch, visit our LightSwitch Consulting page.

Sep 27

Leveraging Technology to Enhance Teaching for the 21st Century

For the last few years, I’ve had the honor to serve on the Fairfax County Public School Superintendent Dr. Jack Dale’s Business and Community Advisory Council. It has given me an opportunity to learn about the challenges of leading one of the largest and best public school systems in the country with a budget of $2.2 billion and 180,000+ students.

Last week, we had our first meeting of the school year. Our existing education system remains tied (some say hobbled) to early 20th century techniques, yet students need to be prepared for the 21st century. It’s not easy to create and apply new teaching techniques on real children. I was pleased to witness a presentation on FCPS taking a leadership role in trying and testing new teaching techniques incorporating new technology. FCPS is forming a partnership with the George Mason University School of Education to create a “laboratory” to test these ideas to see what techniques are effective at providing the services without increasing the budget. This is well beyond the discussion stage. The Academy is being created at Lake Braddock Middle School with an initial group of 200 students. The principal, teachers, and parents met over the summer to plan the changes which are expected next school year. A lottery will be created for admission which is expected to be open to everyone.

Here are my impressions. First, I think it’s great that FCPS is revamping education for the 21st century and adding technology to help. That’s important to teach more effectively and the reality of future budget constraints. Second, I’m impressed that FCPS is willing to attempt such an entrepreneurial venture. Education is a very risk averse culture, and with good reason since the futures of children are at stake. It would be easy to continue to repeat what has worked in the past and change gradually. Instead, innovation is being embraced with a willingness to fail since not every new approach will be successful.

But applying technology effectively is not easy. We have had great advances with technology over the last few decades without students making similar advances. Yet, technology can be used to provide personalized learning with immediate feedback. We also need to teach 21st century skills and not use technology to teach 20th century skills better. Here are some future trends I think we need to consider and address:

1. Facts are Available Instantaneously, Everywhere
People can already look up information on Wikipedia from their smart phones; this has already changed the way people argue. Future technology will search information automatically on a device that is already monitoring the conversation or what you are reading (think smart glasses). The implication is that the memorization of facts will be much less valuable. Knowing where to get it, and how to validate it will be more important. That means teaching history must be focused on WHY and not what events occurred. Life is turning into an open book test, or more accurately open Internet access. This transformation is similar to the advent of the written language which eliminated the need for elders to orally pass information to others.

2. Science is Multi-Disciplinary
I applaud the effort to teach subjects in multi-disciplinary ways. This makes the content relevant. Science is often taught in a cold, isolated manner that is difficult to connect with the real world. We need to transform teaching science from word search (looking up specific facts in book) into active synthesis and idea generation. Hopefully, they’ll also include computer science as part of science, technology, engineering and math (STEM) or at a minimum, allowing computer science to fulfill the language requirement, since this is relevant to all fields in the future.

3. Babel Towers are Crashing
This is where I feel the proposed academy is short-sighted. Teaching “world” languages is a great pre-21st century skill. English is THE world language today. It’s not like Thomas Jefferson needing to learn other languages because everything important was written in non-English languages. Being able to read other written languages is a challenge already solved for free by Google Translate, Microsoft Translate, and many other providers. No one can learn all the languages these online services offer instantaneously. Writing in other languages is also becoming a commodity. Speaking remains a challenge, but it is a matter of when, not if, this is solved. We can then be trained and speak in all sorts of languages one phrase at a time. There’s no need to waste thousands of dollars and hours to train a child to perform worse than what a free device will provide for a dozen languages before they graduate from college.

On a related note, requiring all high school students to devote 3 years to learning another language is a huge waste. People say it’s important to learn other cultures. I don’t dispute that. If that’s the goal, let’s teach that rather than memorizing the narrow vocabulary and grammar of one language. If we really wanted to teach cultures through language, then make it a year each of Chinese, Hindi, and Spanish to cover most people in the world rather than being mediocre in one language and ignorant of most.

4. Non-STEM Subjects are Important
STEM subjects are important, but that’s not all our society needs. Writing and public speaking are critical for conveying one’s ideas and influencing change. Fields that let kids push their individual limits such as playing an instrument, art, and drama should also be available. Analyzing philosophy, ethics, and moral reasoning are critical life skills, highly analytical, and important. Middle schoolers will make dumb decisions. The question is whether they learn how to recognize those situations in advance, to minimize them in the future.

5. Online Teaching is Good and Getting Better
More and more high quality online teaching is available for more and more subjects. Much of this is free, and it’s getting better and better each year. Being online, the content is available 24/7. This trend will not reverse. In fact it is accelerating. Over time, school districts and traditional teaching cannot be competitive with this online content. Whether it’s the Khan Academy or edX and its Harvard and MIT content, students can watch and practice on a platform that’s much more interactive and comfortable than classrooms.

Local schools can also leverage this. Numerically half the teachers (and students) are below average. There are good teachers and great teachers. With the dropping costs of video, storage, and transmission, schools should be recording their best teachers’ instructions so they can be replayed later and shared. It is not fair for students who are not assigned a great teacher to lose out on the experience. It’s not the same as being in the classroom, but kids in other classes and schools should be able to benefit. Other teachers can also learn from them.

For a teacher to provide the same content year after year, is a huge waste of time and resources. Why not do it just once or just have the best teacher do it once for everyone?

6. Teachers are Evolving into Coaches
Recording great instructors and replaying them scares some who think this will replace teachers. That will not happen. Teachers remain critically important, but their roles are evolving into coaches in a world where information is freely available. Online training will only provide a portion of the solution. Just like teleworking is not replacing offices and face-to-face interactions, online teaching will not replace classrooms. Teachers can help and motivate students in a way that impersonal online videos can’t.

Teachers should supplement technologically provided instruction (facts) with hands-on focused refinement that can’t be provided by a recording. Technology does not support social interactions and the skills necessary to present ideas and convince others. It is also very weak in supporting creativity. One could argue it actually prevents creativity.

No football team is considering eliminating the role of the coaches. Technology helps them take their instructions to a higher level. Over time, this trend may even help teachers earn more because they can be more productive by delivering more value and serving more students.

7. We Cannot Predict Future Careers; We Need to Teach the Tools to Achieve Success
Many of the fields today’s middle school students will work in probably don’t even exist today. My whole career (PCs and later the Internet) didn’t exist when I was in college, so it’s hubris to think we can predict what middle school kids today will face. What’s important is a child’s ability to set high expectations, a willingness to try new things, and understanding that failing is a key part of learning to be successful. No one gains self-esteem and confidence by being told they did a good job when they know they didn’t. Self-esteem comes from working hard, overcoming obstacles, and achieving goals. Kids do this very well with video games. We need to transform academic instruction similarly. Rather than focusing on a particular mistake, it’s the response to the failure that’s most important and helping students learn from them. Teachers/coaches play a critical role in helping students achieve higher than they originally expected. That’s what is critical to life and acquiring a resiliency that prepares youths to confidently face challenges their parents and teachers never
imagined.

Conclusions
Overall, I think the attempt to revamp educational delivery with technology is a move in the right direction. Creating a separate academy is the correct method since it shouldn’t be squeezed into the existing system. Applying existing technology and anticipating future technology that will impact and improve teaching is very critical. I’m concerned that the STEM emphasis will prepare kids for today’s tech jobs at Northrop Grumman, Microsoft and IBM. Nothing wrong with that. Unfortunately, the future jobs are being created at technology companies like Apple, Google and Facebook where non-STEM skills have played a prominent role.

Will those companies remain leaders in two decades? We want our students to be engaged and successful in fields that don’t exist yet. We want them prepared to analyze and adapt so that when opportunities arise, they recognize them and are willing to try, fail, and succeed. There is lots of work and many issues to consider. Our country spends over a quarter million dollars to educate each student through high school. Coming up with innovative ways to gain a higher return on those taxpayer investments is critical to our country’s future. I’m glad to see our county playing a leadership role and taking action. What we learn from the academy should be quickly shared across the county, state and nation.

Sep 20

FMS Receives Health Insurance Premium Refund from the Affordable Care Act

Without stepping into a political quagmire beyond this topic, I just wanted to share our experience at FMS related to the Affordable Care Act, better known as Obamacare.

stethoscopeBackground

I’m sure small businesses can do much more with that money than padding the pockets of the executives and shareholders of the big insurance companies. We still see healthcare costs rising, but it’s good to know the rise is tied to actual increases in services being provided rather than profit margins. We look forward to the insurance pool that Virginia is creating for local businesses. From my contacts in our Republican governor’s office, Virginia is not resisting this initiative like some other red states and is moving forward with ways to reduce our cost of doing business here. Practical decisions like this keep Virginia business friendly.

Overall Impact

For companies like FMS that already provide health insurance to its employees, the obligations created by the new legislation don’t impact us since we were already doing them. We also don’t qualify for the small business tax credits which are targeting firms with lower compensated employees. I really like the lifting of the lifetime cap because after all, that’s when you really need insurance and it wasn’t an option previously available to us. I dreaded the idea that one of our employees would have faced a terrible health problem with financial ruin even though they were insured. I also like the moves to reduce the number of healthy people who choose not to buy insurance, yet end up using healthcare services we subsidize. Overall, it’s looking like a win-win for FMS and our employees. It certainly doesn’t solve everything, but it’s a good first step from our experience.

Luke Chung, FMS President


Follow Up

For our experience using the Healthcare.gov website the first time it launched on October 1, 2013, check out: Healthcare.gov is a Technological Disaster

Sep 07

Microsoft Access Error 3045 Could Not Use Database; File Already in Use

Error Message

When you try to open a database, you may encounter this error message: Could not use [Database Name]; file already in use.

Explanation

This error occurs if another user (or instance of Access) has opened up the database exclusively and you try to open it. Maybe the other user opened the database in exclusive mode or made some modifications such as editing modules, which put the database in exclusive mode.

However, that may not be the case. This error can occur even if the other user has the database opened without opening it exclusively. What’s going on? Why would the second instance think it’s being opened exclusively?

What if the Other User isn’t Opening it Exclusively?

It turns out that another cause of this error is not immediately obvious and is related to workgroup security files. This applies to MDB files (not ADP or ACCDB formats). If two instances of Microsoft Access (DAO database engine) are using different system MDW files, a conflict may occur where the database appears to be exclusively locked by the other instance. The MDW file used by your instance of Access can be checked in VBA by examining the value of DBEngine.SystemDB.

Another copy of Access or DAO may have that database opened using another MDW file causing this conflict. This can come from another instance of MS Access, a Microsoft Access add-in or library reference, a VBA Add-in, or other program such as VB6, .NET, etc. that’s connecting to that database.

To avoid this, if you’re using workgroup security, make sure every instance is pointing to the same shared MDW file. This is often defined in the shortcut used to launch Microsoft Access, or if you are opening a different database programmatically within your VBA code.

Additional Resources

Visit our Microsoft Access Error Number and Error Description Reference site for a complete list of Microsoft Access error numbers, many with links to resources explaining and resolving them.

total-access-admin[1]If you’re interested in seeing who’s going in and out of your database in real-time, check out our Total Access Admin program. It’ll let you monitor multiple databases across your network to see when users enter and exit your database and flag instances where connections are dropped suspiciously.

Sep 07

Luke Chung at New York City Microsoft Access User Group Meeting

Please join FMS President Luke Chung at the New York Microsoft Access User Group Meeting on September 10, 2012 at 6:30PM.

Luke Chung is the featured presenter at this New York City event hosted at Microsoft Headquarters located at 1290 6th Ave., between 51st and 52nd Streets.

Luke will discuss and demonstrate FMS products for Microsoft Access, Azure cloud computing, plus answer any questions you may have about his experiences. There will also be product giveaways to members of the user group.

We look forward to seeing you at this free event.

Aug 22

Microsoft Windows Common Control Library (MSCOMCTL.OCX) Security Update Requires Fixing

ActiveX ControlOn August 14, 2012, Microsoft released a security update for Microsoft Office that includes an update to the Windows Common Control MSCOMCTL.OCX.

Unfortunately, this update causes problems with existing Microsoft Access, Visual Basic 6, and other applications that use the common control such as the Treeview and ListBox controls. For us, this impacts our Total Access Analyzer program which uses the Treeview control in its database explorer feature. It triggers this error:

Error 459 – Object or class does not support the set of events,
Procedure clsFrmExplorer_TAA.InitForm

Microsoft provides a workaround for this problem in a Knowledgebase article, but it doesn't always work. We've come up with a solution that addresses this problem reliably.

Read our article Fixing the Microsoft Windows Common Control Library (MSCOMCTL.OCX) Security Update for more details.