Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

The database name component of the object qualifier must be the name of the current database
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


Report this thread to moderator Post Follow-up to this message
Old Post
Tiago Gigli
04-07-06 02:30 PM


Re: The database name component of the object qualifier must be the name of the current database
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/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Report this thread to moderator Post Follow-up to this message
Old Post
Erland Sommarskog
04-08-06 01:25 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 09:04 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006