AnNguyen,
No problem. The error in your code was two-fold.
1. Databases are stored in the sysDatabases table of the Master Database (the sysobjects table stores details of Views ans SProcs)
2. You need to use the full three part naming protocol, (database.owner.objectname) then you can call it from any database (as long as the login as priveledges).
Happy coding,
Logicalman