OPENROWSET not working from client machine..

  • Hi folks,

    I encountered a problem while i was importing data from excel sheet.

    The below statement :

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

    'Excel 8.0;Database=D:\CampaignInfo_MPM\MPM Questionnaire.xls',[Campaign$]) camp

    is working fine when i execute it from the same server machine through windows authentication but its not working when i am executing it through windows authentication through any of the client machine.

    It is showing me an error message...

    [font="Arial"]Msg 7399, Level 16, State 1, Line 1

    The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" reported an error. The provider did not give any information about the error.

    Msg 7303, Level 16, State 1, Line 1

    Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".[/font]

    Any help will be highly appreciated.

  • SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',

    'Excel 8.0;Database=D:\CampaignInfo_MPM\MPM Questionnaire.xls',[Campaign$]) camp

    Where do you think this statement is executed? Connecting to SQLServer from Client PC and then executing the SQL statement - does not mean that it will be executed on a Client machine!

    Now, you have two problems:

    1. The file should be located on the SQL Server itself

    2. The user who executes this statement from a Client machine should have access to this file on SQL Server machine.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Thank you for your reply

    The file is located in the server machine's D:\ drive

    Another thing is that I am loging into SSMS in Client / Server through the same windows login. Will there be any problem of permissions in either case.

  • You may want to read through these couple of blogs:

    http://blogs.msdn.com/b/spike/archive/2008/07/23/ole-db-provider-microsoft-jet-oledb-4-0-for-linked-server-null-returned-message-unspecified-error.aspx

    and

    http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/d92a73c0-9c87-4adf-a6a3-061a48b8dac5

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Thank You Eugene Elutin....!

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

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