Error joining tables from separate db's using SqlCommand object
From: Corbin (corbinamman_at_gmail.com)
Date: 01/25/05
- Next message: Michael Kellogg: "Re: Constructing a Dataset from XML"
- Previous message: Corbin: "Re: ASP.NET Connection String"
- Next in thread: Elton Wang: "Error joining tables from separate db's using SqlCommand object"
- Reply: Elton Wang: "Error joining tables from separate db's using SqlCommand object"
- Reply: Elton Wang: "Error joining tables from separate db's using SqlCommand object"
- Messages sorted by: [ date ] [ thread ]
Date: 25 Jan 2005 11:04:16 -0800
I'm trying to run a query that joins tables from 2 databases on the
same server. The query is like this:
SELECT TitleID, u.Name as Assignee
FROM tblTitle t
LEFT JOIN titlepost..Portal_Users u
ON t.TitleProcessor = u.email
When I put it in a stored procedure and execute the sp using SqlCommand
object, there are no problems. But I need to be able to run this query
using the CommandText property rather than by calling a stored
procedure. When I attempt this, I get "Invalid object name
'titlepost.dbo.PortalUsers'". My connection string is
"server=10.10.10.10;Trusted_Connection=true;database=abstractors"
Any suggestions are appreciated.
Corbin
- Next message: Michael Kellogg: "Re: Constructing a Dataset from XML"
- Previous message: Corbin: "Re: ASP.NET Connection String"
- Next in thread: Elton Wang: "Error joining tables from separate db's using SqlCommand object"
- Reply: Elton Wang: "Error joining tables from separate db's using SqlCommand object"
- Reply: Elton Wang: "Error joining tables from separate db's using SqlCommand object"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|