First, if you are going to ask a question on the forum, always provide all information available. In your case, you mention an error, but do not specify or show it. So please give the exact error.
Secondly, I would think it isn't possible, as you have two different database connections. If it's two different databases, it is out of the question, you cannot join tables from different databases. But even if it's the same database, if it's two different connections I don't see how you could join.