SQL 2005 Server with 64 Bit Cannot Use OpenRowset

  • Hello,

     

    Without using DTS or SSIS does anyone know how to import an excel file into SQL 64 bit using openrowset or something similar that is not too complicated.  I believe it is not supported and am trying to figure out if i can use a driver similar to jet.

     

    The way i used to do it in SQL 2000:

    SELECT * INTO #MyTable

    FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',

       'Excel 8.0; Database=\\MyServer\MyDir\MyExcelFile.xls',

       'Select * from [Sheet1$]') 

  • Mark,

     

    the problem is not that OPENROWSET is not supported, but that for security reasons, by default Ad-hoc remote queries are disabled. You need to eablem them either through the Surface Area Configuration tool or through sp_configure.

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • Hello - So I used sp_configure to set the ad hoc distributed queries to 1 and then i ran reconfigure.  I received the following error:

    This is for 64 bit

     

    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.

     

     

  • check this forum : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1433118&SiteID=1

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Is there anyway to fix this error without touching registry keys?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply