Issue in using OPENROWSET

  • Hi,

    I am trying to upload set of data from Excel to database in sql 2000. I am using below query

    SELECT * INTO SORTMP

    FROM OPENROWSET('MSDASQL', 'Driver={Microsoft Excel Driver (*.xls)};DBQ=C:\SOR.xls',

    'SELECT [ID],[DESCRIPTION],[UNIT],[RATE] FROM [1$]')

    It is getting executed some time successfully and records uploaded. sometimes it is throwing below error

    Server: Msg 7399, Level 16, State 1, Line 1

    OLE DB provider 'MSDASQL' reported an error. The provider did not give any information about the error.

    What might be the issue? Any help is appreciated.

    Thanks

  • This error can occur when the file is open (in Excel).

    SQL = Scarcely Qualifies as a Language

  • Thanks SSCrazy..

    When I try to use the same file I am getting that error(Excel file is not manually opened). I tried to copy the same file with different name and it is working fine with out any error... It is really Scarcely Qualifies as a Language 🙂

  • This error, vague as it is, can also indicate a permissions problem. Compare the permissions between the original file and the copy you made.

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

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