Results 1 to 3 of 3

Thread: Error Help!!!!!!

  1. #1
    Join Date
    May 2003
    Posts
    1

    Unhappy Error Help!!!!!!

    I created a linked server to access information in an excel spreadsheet
    by using this code:

    exec sp_addlinkedserver N'LINKEXCEL_OL',
    @srvproduct = N'',
    @provider = N'Microsoft.Jet.OLEDB.4.0',
    @datasrc = N'C:\dt.xls',
    @provstr = N'Excel 8.0;'

    I created a login using this code:

    EXEC sp_addlinkedsrvlogin 'LINKEXCEL_OL', 'false'

    and I tried to run a query using this code:

    select * from openquery(LINKEXCEL_OL, 'select * from [Sheet1$]')


    Everything is ok until the select when I get this very descriptive error(sarcasm):

    OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error.
    OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.].

    Does anyone have any suggestions??? I am very lost and do nto see why this wouldn't work..

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    The problem may be in sp_addlinkedsrvlogin procedure. Drop your linked server login using sp_droplinkedsrvlogin and recreate it as

    EXEC sp_addlinkedsrvlogin 'LINKEXCEL_OL', 'false', null, null, null

    You should be fine after that. Also make sure that the excel sheet is not open when you query using SQL.

  3. #3
    Join Date
    Mar 2003
    Location
    NJ
    Posts
    201
    Appreciate for the answers!!

    save my days of work...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •