1

How to solve this Error

Msg 7308, Level 16, State 1, Line 1 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.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
jay
  • 3,699
  • 7
  • 28
  • 28
  • 3
    Hi jay, welcome to Stack Overflow! Unfortunately, from the description you've provided, there's not really enough information to diagnose your problem. You'll have to be a little more specific and tell us what you were trying to do when that error occurred, as well as any other information you might think is relevant. – Dean Harding Jul 09 '10 at 06:07
  • 1
    What version of SQL Server? And is it 64 bit (SQL Server and OS)? – gbn Jul 09 '10 at 06:09
  • SQL Server 2008 and 64 bit , windows 7 i export sql server data to excel – jay Jul 10 '10 at 08:30

2 Answers2

1

I just did a bit of research on this myself. Here's the MSDN article that describes the error and provides a basic resolution:

http://msdn.microsoft.com/en-us/library/cc645919.aspx

Information on what single threaded and multi threaded apartments are:

Single-Threaded Apartments vs Multi-Threaded Apartments

This was a page where someone had the problem and a number of possible solutions were posted:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=119887

From the research i've just done, you might be trying to connect to a linked server that may be running Oracle. You'll need to use a different provider to connect to it. That's based on what you've provided, and what i've found.

Community
  • 1
  • 1
0

I'm guessing you're using an Access database and you're trying to run a query that joins between that Access database and a server based system like SQL or Oracle. Thing is that won't work (you've seen the error message). For a database to be able to handle queries across two or more separate systems it needs to support some kind of distributed transaction support and that's not Access.

I think the best solution for this is to move the data from Access into SQL or vice versa.

Tom H
  • 46,766
  • 14
  • 87
  • 128
MrTelly
  • 14,657
  • 1
  • 48
  • 81