我从那里得到了这段代码http://support.microsoft.com/kb/321686
,我做了这个例子,我正在尝试创建一个存储过程:
use [Libatel]
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[Import1]
AS
BEGIN
SELECT * INTO CardsImported FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\Barcode.xls;Extended Properties=Excel 8.0')...[Sheet1$]
END
GO
但我无法创建它,我收到了这个错误:
"Msg 7308, Level 16, State 1, Procedure Import1, Line 6>OLE DB provider 'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode."