>Hi,
>
>I use sqlpassthrough to update the remote tables. Here is the code
>
>in the load event of my form, I place the following code
>
>nHandle = Sqlconnect("bbfsdsn")
>csql = [Select callrefno, calldate, calltime from Accounting!callinv]
>nResult = Sqlexec(nHandle, csql, "Cur_callinv")
>
>Cursorsetprop("Tables","callinv","cur_callinv")
>Cursorsetprop("KeyFieldList","callrefno","cur_callinv")
>Cursorsetprop("UpdatableFieldList","calldate,calltime","cur_callinv")
>Cursorsetprop("SendUpdates",.T.,"cur_callinv")
>Cursorsetprop("Buffering",5,"Cur_callinv")
>
>I also placed the following code in the init event
>
>thisform.grid1.RecordSource = "cur_callinv"
>thisform.grid1.column1.ControlSource = "cur_callinv.callrefno"
>thisform.grid1.column2.ControlSource = "cur_callinv.calldate"
>thisform.grid1.column3.ControlSource = "cur_callinv.calltime"
>
>I placed the following code in the click event of mybutton
>
>Tableupdate(.T.,.T.,"cur_callinv")
>thisform.Release()
>
>The problem is everytime I change a field value in the grid and hit the updated button, it does not update the remote data. What seems to be wrong?
Mike,
UpdateNameList is missing. You should provide a list specifying KEY FIELD + all updatable field list as 'ViewName RemoteTable.RemoteFieldName,...'. Probably yours would look like :
Cursorsetprop("UpdateNameList",;
"callrefno callinv.callrefno, "+;
"calldate callinv.calldate, "+;
"calltime callinv.calltime","cur_callinv")
Remember though docs doesn't make it clear KEY FIELD(s) is in list though it's not in updatablefieldlist.
PS : Adding "WhereType",1 might be usefull.
Cetin