Click here to Skip to main content
15,891,713 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi EveryOne,

i want to save the data in excel using OPenRowset Command in sqlserver.
but i am getting the below error. kindly any one help me how to reslove this error.

Error:
OLE DB provider "SQLNCLI10" for linked server "(null)" returned message "Deferred prepare could not be completed."

Query:

SQL
select *  FROM OPENROWSET(
'SQLNCLI',
'Server=User-pc;User Id=sa;password=sa123;data base=Test',
'select billing_id,process_id from Test.dbo.Billing'
) AS Employees




Thank you,
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900