>>I'm using ODBC-based remote views to insert data into SQL Server tables. The general process is:
>>
>>1. CREATE SQL VIEW MyView ...
>>2. USE MyView
>>3. APPEND FROM SomePath\SomeVFPTable.DBF
>>4. =TABLEUPDATE( .T., .T., "MyView" )
>>
>>The column names, types and sizes are the same in the VFP table and the destination SQL Server table (names yes, types as close as they can be).
>>
>>All of the above runs without generating any errors. However, there are no rows in SQL Server after the code runs (should be 92 rows for the test table I'm using).
>>
>>I have SET MULTILOCKS ON but I've made no other changes to default remote view settings. I suspect I need to set some remote view properties for MyView via CURSORSETPROP() before APPENDing the data and running TABLEUPDATE(). Can someone remind me which properties I need to set?
>>
>>UPDATE: it looks like, at a bare minimum, SendUpdates needs to be set .T. Any other recommendations for best performance/efficiency? I'm thinking setting the view to Optimistic Table Buffering given the type of updating I'm doing.
>
>My guess is that remote view doesn't have the SendUpdates property set properly. You can do that like this:
>
>DBSetProp('MyView', 'View', 'SendUpdates', .T.)
Yep, I found that one a few minutes before you posted. I'm working against a SQL Server backend so I used CURSORSETPROP( ) rather than DBSETPROP( ).
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up