Database "alias" is not open (Error 1534)

You have attempted to SET DATABASE TO a database that is not yet open.

Try OPEN DATABASE first.