>>>I created a program to update tables in a database but in one table when I edit the field more than once in the same session a message box comes up saying this field has been edited by another user already, continue with edits? Yes or No. When I press Yes (when the views are configured for Key and Updatable) it changes all the fields to the last changed field. I created this program using Wizards and it seems like it is only one table that has this problem. I am using SQL 7 and also using views.
>>>
>>>Thanx
>>
>>Are you using remote views on SQL Server data? Are you doing a table update to the server to update the first edit? Or are you just sending all the records that were editied back to the server in one pile?
>
>The program allows me to edit, then save, it then sends that change to the SQL server, then I go to do another edit and that is when the message box comes up and prompts me to answer either yes or no to the its statement. And yes, I am using remote views on SQL Server data.
>Thanks, any help at all is really appreciated.
OK, are you updating the record only at the server, or the entire data set?
Let's say you ask for all invoice items and SQL Server sends you 3 transactions. You change the discount for the first line item. When you say save edit, does it send the entire set back, or are you sending just that transcation, or better yet, that modified field?
Do you use eview.app available from the files section here?
I have an updatable Remove view. Here is some of the code for that
DBSetProp('RV_MASTER2', 'View', 'UpdateType', 1)
DBSetProp('RV_MASTER2', 'View', 'SendUpdates', .T.)
DBSetProp('RV_MASTER2', 'View', 'WhereType', 3)
Check your where type. That may be what is wrong?
Just change the DBSETPROP to DBGETPROP and it should be easy to find out.
__Stephen