You are here: Re: The database name component of the object qualifier must be the name of the current database « MsSQL Server « IT news, forums, messages
Re: The database name component of the object qualifier must be the name of the current database

Posted by Erland Sommarskog on 10/02/68 11:44

Tiago Gigli (gigli.tiago@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, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация