0

我从那里得到了这段代码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."
4

1 回答 1

1

Found the way ! well i have a 64 bit PC , i uninstalled my 32 bit office that came with the PC , i got the 64 bit version , i downloaded "AccessDatabaseEngine_x64.exe" from http://www.microsoft.com/en-us/download/details.aspx?id=23734 , that's pretty much it

于 2013-05-18T15:13:01.037 回答