Arnold,
Each field in your view needs to have its KeyField and Updatable properties set with DBSetProp. If you're writing the view programmatically you will have to put all of this code in yourself. Better to download EView (by Erik Moore) from the Files area. Create your view with just the code you have here, then bring it up in EView. Eview will allow you to set all of the properties easily and export the code for your program.
Also, be sure that the underlying table is not buffered, or if it IS buffered that you save this updated table to disk AFTER running TableUpdate() on the view.
HTH
Barbara
>>Hi,all
>>
>>I have a view that combines a temporary cursor and a table like this...
>>
>>Create Cursor Lookup (CR_NO C(12))
>>Insert Into Lookup (CR_NO) value ("AA")
>>Insert Into Lookup (CR_NO) value ("BB")
>>
>>Create SQL Viwe Lookup_view as Select TABLE1.NO,TABLE1.PK from TABLE1 inner join Lookup on TABLE.NO=Lookup.CR_NO
>>
>>DBSETPROP("Lookup_view","TABLES","TABLE1")
>>DBSETPROP("TABLE1.PK","FIELD","KEYFIELD",.T.)
>>DBSETPROP("TABLE1.PK","FIELD","UPDATABLE",.T.)
>>DBSETPROP("Lookup_view","VIEW","SENDUPDATES",.T.)
>>
>>The view were successfully created but the view can't be updated to based table.I double check with view designer,found the update flag was missing.
>>
>>At the other hand,after I modify the Create SQL view by using parameterized view rather than refer to cursor like that...
>>
>>Create SQL Viwe Lookup_view as Select TABLE1.NO,TABLE1.PK from TABLE1 where TABLE.NO=?AskForNo
>>
>>Everything is fine as well as the Update flag was correctly marked in View Designer.Is this a problem in Create SQL view statement pointer to a cursor ?
>>
>>Thanks for any comment in advance.
>
>Some typing mistakes to clarify...
>DBSETPROP("Lookup_view.PK","FIELD","KEYFIELD",.T.)
>DBSETPROP("Lookup_view.PK","FIELD","UPDATABLE",.T.)
>
>Sorry
>
>Arnold