Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a view conflict 1

Status
Not open for further replies.

foxrainer

Programmer
Jan 10, 2002
270
US
I am using three tables in a fiew:
1-Patient
2-Visits
3-Codes

In the DataEnvironment, all three are used with 3-Optimistic buffers

All three are properly related by a unique numeric field

A view is created of most fields of all three tables, called: view_patient_visits_codes, also being used with 'Optimistic Buffering'

Visists has a T/F field for follow_up

A Child form of my program uses a grid to display records that are true or false, and gives the ability to change all to .t., using:
RePLACE ALL follow_up WITH .f.

Now, if I give the command while view_patient_visits_code is without buffer, a 'Update Conflict' error occurs.

If the view is buffered, the replace statment works, but, a requery of the view gives an 'Uncommitted Change' error.

Using the base tables un-buffered would mean a lot of changes in the program.

Can anyone help me with this dilemma?

Thank you in advance

Rainer
 
Are you using the View Designer?
If so, under "Update Criteria", make sure the index item (field) for visists is checked and make sure the follow_up field is checked, and make sure "Send SQL Updates" is checked.

If you are coding the view, use CURSORGETPROP( ), etc. to define the elements.

Dave

 
The view does have Send SL update as yes, still, I am not sure if the conflic toccurs because a record of the base table is displyed in the parent form?

Rainer
 
Your mistake is that you opened the source tables for the view with buffering. You DON'T want to do that! If you do, then each TABLEUPDATE you do on the view must be followed by a TABLEUPDATE on each of the source tables, or you've still got buffered data.



-BP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top