Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Insert from XLS to sql 2008 express

Author  Topic 

willware
Starting Member

6 Posts

Posted - 2012-08-14 : 22:24:33
I have tried the following statment and get the the following error

sp_configure 'Ad Hoc Distributed Queries',1
GO
RECONFIGURE;

INSERT INTO [Sendsuite Live].dbo.[Shipping Order Header] ([Order Number],[Ship Date],[Ship Company],[Ship Address One],[Ship Address Two],[Ship Address Three],[Ship City],[Ship State],[Ship Zip],[Ship Country],[Ship Phone],[Ship Email]) Select A, B, H, I, J, K, L, M, N, O, HM, HN
from OPENROWSET('Microsoft.ACE.OLEDB.12.0',

'Excel 8.0;HDR=YES;IMEX=1;Database=G:\customers\ppm\shipping.xls',

'SELECT * FROM [shipping$]');
____________________________________________

Configuration option 'Ad Hoc Distributed Queries' changed from 1 to 1. Run the RECONFIGURE statement to install.
Msg 7308, Level 16, State 1, Line 3
OLE DB provider 'Microsoft.ACE.OLEDB.12.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.


William E Ware
   

- Advertisement -