SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


OpenDataSource query


OpenDataSource query

Author
Message
RAKSHITHA
RAKSHITHA
SSC Veteran
SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)SSC Veteran (218 reputation)

Group: General Forum Members
Points: 218 Visits: 163
INSERT INTO OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0','Data Source=D:\Book1.xls;Extended Properties=Excel 12.0')... [sheet1$]
SELECT * FROM dbo.tbl_webform

The above query is to export data from SQL table to spreadsheet which is already created and this query is working fine.. But when I execute the query like below, I am getting an error: Msg 7390, Level 16, State 2, Line 74
The requested operation could not be performed because OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" does not support the required transaction interface.

INSERT INTO OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0','Data Source=D:\Book1.xls;Extended Properties=Excel 12.0')... [sheet1$]
EXEC dbo.usp_test

The procedure usp_test is nothing but the Sproc for single SELECT query


CREATE PROCEDURE [dbo].[usp_test]
AS
BEGIN
SELECT * FROM dbo.tbl_webform
END


Anyone please help me how to solve this error..
sgmunson
sgmunson
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17481 Visits: 4638
I'm not sure the ACE drivers are going to support executing a sproc. Given that it's a simple select, using a sproc seems totally unnecessary. If it were a more complex sproc, I'd probably insert the output of the sproc into a temp table and select from that for the insert.

Steve
‌(aka sgmunson)
Smile Smile Smile
Health & Nutrition
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search