Problem reading .dbf file

  • Hi All

    I am having a problem reading data from a .dbf file. This file is created by a third party app and I need to import the data into SQL server 2000. Previously I could do this but we migrated to a new hardware platform and now it wont work. We were running SQL server 2000 on win 2000 server, we now run SQL server 2000 on win 2003 server but the stored procedure code is the same. The code I use is shown below:

    SET @sSQL = @sSQL + ' FROM OpenDataSource'

    SET @sSQL = @sSQL + ' ( ''Microsoft.Jet.OLEDB.4.0'''

    SET @sSQL = @sSQL + ' , ''Data Source=' + @attachFolder + ';User ID=Admin;Password=;Extended properties="dBase IV"'''

    SET @sSQL = @sSQL + ' )...[' + @attachFileNameWithoutFolderOrExtension + ']'

    and the full path to the file is passed in to the stored procedure.

    When I run this code I get the error:

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

    [Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.

    [OLE/DB provider returned message: Index not found.]

    OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBSchemaRowset::GetRowset returned 0x80004005: ].

    This file does not require an index file. I tried opening the file in access and I get a dialog asking for the location of an index file as well. Does anyone know what is going on here or how to tell the jet engine to not use an index file or is ther another way of opening the file (it open fine if I use excel).

    Any help would be really appreciated.

  • No need to cross post - continue in other thread..

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=23&messageid=345690

Viewing 2 posts - 1 through 1 (of 1 total)

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