SQLDMO backup error

  • I'm using Andy's SQLDMO backup example to backup my databases on the server.

    It works fine when I backup to C:\Backup. But when I try to backup to a directory

    that contains a space in the name, like "C:\Backup\Database Backups" I get an error.

    Cannot open backup device..... device error or device off line.

    How can I get it to work in cases where there might be a space in one of the directory names?

    Thanks.

  • Wrap it in brackets, like this:

    "[C:\Backup\Database Backups]"

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply