ADO Problems (Error 430) with VB6 on Windows 7

Programming, Technology  Tagged , No Comments »
Posted by

Lot of numbers in that heading. :)

We've made the move to Windows 7 and we love it.  However, we haven't really made the move to VB.NET.  I still like developing in VB6; I know that makes me a little bit of a relic, but I don't do that much development these days to justify the investment in fully ramping up on VB.NET.

So, I had to tweak a legacy application I wrote which reads an email from a POP3 mailbox and writes the contents into a database.  The program is maybe 30 lines long, and it's a dream thanks to the w3JMail library and ADO.

I revised the program, ran it on my Windows 7 machine, and all was right in the world.  I went to deploy it back to the Windows 2003 server where it lives, and I was hit with Error 430 errors: "Class does not support Automation or does not support expected interface"

So, after adding line numbers to the code, I was able to track the error down to the line

Set objConn = New ADODB.Connection

That seemed weird.  I tried a bunch of different ADO libraries and nothing.  Then I stumbled upon a MSKB article, with the longest, most specific title I've seen in recent memory: "An ADO application does not run on down-level operating systems after you recompile it on a computer that is running Windows 7 SP 1 or Windows Server 2008 R2 SP 1 or that has KB983246 installed"

Long story short, if you're running Win7 SP1 or Win08R2 SP1, then .NET breaks ADO and you need to register some new type libraries on your local machine and then recompile using those type libraries, NOT the usual ADO libraries.

The KB article shows you how to do it easily enough. Put the files where they tell you.  I had to manually navigate to the folders for some reason, but once I did, they registered up like a charm and my programs ran again.

Installing Chrome on a Windows 2008 R2 Terminal Server

Productivity  Tagged , , No Comments »
Posted by

Chrome is a pretty fantastic browser; in fact, I'm using it right now!  However, it wants to live in your AppData directory, and that's a drag for users on Terminal Servers since administrators can't easily install the application into that location, and users can't install it themselves if they're not administrators...

But Google has come to the rescue with an alternate installer that you can grab from their website: http://support.google.com/chrome/bin/answer.py?hl=en&answer=126299

So, log yoursef on the terminal server as an adminsitrator and download the Alternate installer for all user accounts.

Google is going to freak you out with a big button that says "Accept and Install" after you review the EULA.  DON'T PANIC! You;'ll be allowed to download the installer (ChromeStandaloneSetup.exe) and install it using the Programs app in the Control Panel, as you install all programs on the terminal server.  (You do use that, right?)

Backing Up To Multiple Removable Drives in Windows 2008 R2

Productivity, Tips  Tagged , 11 Comments »
Posted by

These days, we use a dock that accepts SATA drives as a target for backing up client systems.  It allows for the most flexibility as data resources grow, easy swapping of media, etc.

However, Windows 2008 Server Backup doesn't like this arrangement.  The wizard wants all targets present at the time of configuration.  Since we only have one dock (and a minimum of two drives), if we try to add additional hard drives to the job, the wizard fails with the error: "The filename, directory name, or volume label syntax is incorrect" and the backup job is not modified.

Happily, Microsoft comes to the rescue with a KnowledgeBase article which outlines the three options:

  1. Reattach all disks (not an option in our situation)
  2. Delete the missing disk (not an option when there's only one disk configured; you have to delete the whole job... plus, we *want* the missing disk to be part of the job since *all* disks except the one that's connected will be missing)
  3. Do some command line voodoo.  (Bingo!)

So, the steps are:

  1. Find "Command Prompt" in the start menu and "Run as Administrator" from the right-click menu
  2. Get the drive ID of the disk we want to add to the job as we'll need it for the next step:
    1. At the command prompt, type wbadmin get disks
    2. Each drive attached to the system will be listed; so find the removable disk and copy the long string of numbers (and the brackets) that make up the "Disk Identifier"  Copy this to the clipboard (using Mark, Paste from the Window menu... I use ALT+SPACE, E, M as a keyboard shortcut)
  3. At the command prompt, now type WBADMIN ENABLE BACKUP -addtarget:{PASTE-YOUR-DISK-ID-HERE} (I use the keyboard shortcut ALT+SPACE, E, P)
  4. You'll get a one or a bunch of prompts (depending on if the drive is formatted for backups or not, if existing backups are present on the disk, etc.) which mimic the questions in the wizard about the disk, answer appropriately.
  5. Finally, make sure you answer Y to the question "Do you want to enable scheduled backups with the above settings?"

The script will finish running and eventually leave you back at a command prompt.  You can close the window.

Now, when you look at the Backup screen, you'll see multiple targets in the DESTINATION settings, and the Destination Usage drop down will show the drive that's connected PLUS the disconnected drive.

And we're all set.


WordPress Theme & Icons by N.Design Studio. WPMU Theme pack by WPMU-DEV.
Entries RSS Comments RSS Log in