Here is a query I used often:
SELECT *
FROM OpenRowSet('SQLOLEDB', 'servername';'userid';'password','SELECT * FROM RquantTest.DBO.EarScales')
>that gave me an incorrect syntax error near ; . I assume it is because the connection string needs to be tied together. I tried a few alterations to this statement, but I still get the same error, invalid login.
>
>SELECT Inventory.Descr, Inventory.InvtID, Inventory.User6
>FROM Inventory
> INNER JOIN OPENROWSET('SQLOLEDB',
> '(local)';'x';'123';'select * from medex..inventory') LocalInv ON
> Inventory.InvtID = LocalInv.solomonid
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com