By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,806 Members | 1,841 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,806 IT Pros & Developers. It's quick & easy.

The database name component of the object qualifier must be the name of the current database

P: n/a
Guys,

1st of all.. sorry about my english ok? Im from Brazil...

Im trying to get a RS connecting through 2 databases with the query
below:
SELECT
scar..osbalcao.numeroos,
ccell.dbo.atrib_os.os
FROM
ccell.dbo.atrib_os
JOIN scar.dbo.osbalcao on ccell.dbo.atrib_os.os =
scar.dbo.osbalcao.numeroos
WHERE scar.dbo.osbalcao.localprod = '257'
AND scar.dbo.osbalcao.status in ('EM')

On a SQL IDE i got a good RS, but, when i try to use that same query on
Delphi + ZEOS, the SQL Server tells me that "The database name
component of the object qualifier must be the name of the current
database".

I really dont understand why. I can only tell that the error is
returned from SQL Server.

Have anyone got the same trouble?

[]'s

Tiago Gigli

Apr 7 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Tiago Gigli (gi*********@gmail.com) writes:
1st of all.. sorry about my english ok? Im from Brazil...

Im trying to get a RS connecting through 2 databases with the query
below:
SELECT
scar..osbalcao.numeroos,
ccell.dbo.atrib_os.os
FROM
ccell.dbo.atrib_os
JOIN scar.dbo.osbalcao on ccell.dbo.atrib_os.os =
scar.dbo.osbalcao.numeroos
WHERE scar.dbo.osbalcao.localprod = '257'
AND scar.dbo.osbalcao.status in ('EM')

On a SQL IDE i got a good RS, but, when i try to use that same query on
Delphi + ZEOS, the SQL Server tells me that "The database name
component of the object qualifier must be the name of the current
database".


Try skipping databaes and schema names from the column references.

If that does not help, run Profiler and see what Delphi actually sends
to SQL Server. It's probably producing some prepare query or similar.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Apr 7 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.