假设:
数据库DB_A,表Table_A
数据库DB_B,表Table_B
那么联合查询写入如下:
select *from DB_A.dbo.Table_A a inner join DB_B.dbo.Table_B b on a.ID=b.ID
你将你的代码贴出来让我看看,看能不能解决。