Foxpro linked server - cant delete nor update

  • I have linked server to vfp9 using latest driver as per

    sp_addlinkedserver @server = 'FRED',

    @srvproduct = 'VFP',

    @provider = 'VFPOLEDB.1',

    @datasrc = 'c:\data\fred\dbfs'

    I now query using

    select * from fred...drugnote where cast(dntcode as nvarchar(255))=N'ANPE1'

    and I get my record set.

    I want to delete this record, so I am using

    delete from fred...drugnote where cast(dntcode as nvarchar(255))='ANPE1'

    but I get the following error

    OLE DB provider "VFPOLEDB" for linked server "fred" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

    Msg 7333, Level 16, State 2, Line 1

    Cannot fetch a row using a bookmark from OLE DB provider "VFPOLEDB" for linked server "fred".

    What the %^$%?

    Any help would be appreciated.

    Cheers

  • OK

    Found out a lot more. It seems that updates, inserts and deletes are NOT permitted with VFPOLEDB.

    GREAT!!!!!

    Does anyone know of a work around?

    Cheers

  • Hi

    If you have found any soln please provide, as I am also stuck in this.

    Thanks

  • I am able to select and insert new rows, but for an update and delete I get the same message. SQL Server 2005 (2000 compatibility mode) and latest VPFOLEDB drivers. Is there a way to update/delete?

  • Dear friend,

    Could you please tell me how to insert records in to DBF file from sql server using ad-hoc queries.

    Foxpro version 2.5

    sql server 2008

    Early reply appreciated....

  • Foxpro error msgs are pretty "obtuse". Its probably trying to complain about the "fred...drugnote" part. I use openquery() through the linked server for all CRUD statements successfully. For non-select statements, you just have to ignore the various flavors of "no columns returned" errors. If you're not comfortable with faith-based sql, followup with a SELECT to confirm success.

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

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