Re: Error using OPENROWSET
- From: "Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@xxxxxxxxxx>
- Date: Fri, 15 Dec 2006 18:03:05 +0100
By default, SQL Server does not allow ad hoc distributed queries using
OPENROWSET and OPENDATASOURCE against providers other than the SQL Native
Client OLE DB Provider. You can allow this with a new sp_configure option.
Check the "Ad Hoc Distributed Queries Option" topic in Books OnLine.
--
Dejan Sarka
http://www.solidqualitylearning.com/blogs/
<larclap@xxxxxxxxx> wrote in message
news:1166172019.412378.158340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have the following statement:
INSERT INTO MailHouse2.dbo.ClientUseCode
(ClientID, CountyFips, UseCode)
SELECT *
FROM OPENROWSET('SQLOLEDB.1','Provider=sqloledb.1;Data
Source=(localhost);Initial Catalog=MailHouse;uid=uid;pwd=pwd;',
'select 1 as ClientID,u.countyfipsid as CountyFips, u.usecodeid as
UseCode
from usecode u
inner join univusecodemap m on u.usecodepk=m.usecodefk
inner join compusecode c on u.usecodeid=c.usecode')
I know the inner select works because I've run it on the Mailhouse
(SQL2000) instance. However, when I run the entire query above from the
MailHouse2 (SQL2005) instance, I get the following error:
OLE DB provider "SQLNCLI" for linked server "(null)" returned message
"Deferred prepare could not be completed.".
Can someone help PLEASE?
.
- References:
- Error using OPENROWSET
- From: larclap
- Error using OPENROWSET
- Prev by Date: Re: Virtual Cubes 2005
- Next by Date: Re: Data storing
- Previous by thread: Error using OPENROWSET
- Next by thread: Virtual Cubes 2005
- Index(es):
Relevant Pages
|