Odd SQL Server Studio error, but not on SQL Server Express?
The remote database has compatibility level 80, which doesn't work with db_id().  More info on a related StackOverflow question.  

(Just dumping this into an answer from the question comments so it disappears from the Unanswered list of questions.)