Today I wrote a query that references another database - other than the one in TZConnection.Database
Code: Select all
SELECT Rendszam,FszgA,FszgB,CI
FROM Online FULL OUTER JOIN BUSDATADKV.dbo.Jarmu
ON (BUSDATADKV.dbo.Jarmu.FSZGA=Online.CI) OR (BUSDATADKV.dbo.Jarmu.FSZGB=Online.CI)
WHERE CI=999 OR BUSDATADKV.dbo.Jarmu.FSZGA=999 OR BUSDATADKV.dbo.Jarmu.FSZGB=999 ORDER BY Rendszam ;
Code: Select all
General SQL Server error: Check messages from the SQL Server.
The database name component of the object qualifier must be the name of the current database.
Therfore it's very likely that it's possible to do this with Zeos.
To resolve the problem, I've tried to empty the database property from ZConnection and put exact database references before each table name in the query, but it gave me the same error.
I was also searching in the MSSQL manual, but found nothing about connections and databases, but this is the expected case from Microsoft Corp.
So can anybody tell me please, how can I access two MSSQL databases from one ZQuery on one ZConnection ?
Thank You.
Cheers,
Peter