Thankz for taking so much of your time. I really appreciate it. Well it 
could be two different forms were opened which have similar views. Let me 
look into it. I remember the user was going and checking a few things when 
the Orders form was open.

The send form which opens to add child records open in the default data 
session.

I have changed the wheretype to 1. Frankly speaking I have never understood 
that. It worked in setting 3 and so I never changed it. Setting 1 makes 
sense.


Regards

Ajoy Khaund
Neamati Road
Near Bhogdoi Bridge
Jorhat 785001-21
Assam, India

Tel: 91-376-2351288
Cell: 91-94350-92287
Mail: [email protected]
Mail: [email protected]

"Walking on water and developing software from a specification are easy if
both are frozen."
- Edward  V. Berard, "Life-Cycle Approaches"

--------------------------------------------------
From: "Rick Schummer" <[email protected]>
Sent: Friday, April 03, 2009 12:24 AM
To: <[email protected]>
Subject: RE: Save fails sometimes Vfp9 Sp1

> Your app might be used by a single user, but the app can be effectively
> multiuser with private datasessions and two instances of the same form or
> different forms with the same data.
>
> The Key and Modified will return a data conflict if the same record is
> edited in two forms. What happens is each form the view is queried. One
> query is has the changes committed. The second form tries to commit the
> changes. If the key or any of the fields being modified in the second
> instance are different than the table the view cannot be committed. If 
> form
> one changed the customer name field, and the second one changed the 
> address
> field the second view will get committed.
>
> What you are seeing with the view being requeried is the buffer get a 
> fresh
> set of the data from the table. This lessens the chance of the conflicts. 
> If
> you changed the view to key only you implement a last one wins scenario.
> Whoever saves the data last always has their information committed to the
> table. This works for certain business situations.
>
> This second form, is it using the default data session (which is the same 
> as
> the calling form) or is it a private data session? If it is private and it
> opens the data and commits changes, it would effectively cause the problem
> you are seeing provided the error you are getting is a data conflict - and
> have not told us the results of this. We could be chasing our tail here.
>
> Rick
> White Light Computing, Inc.
>
> www.whitelightcomputing.com
> www.swfox.net
> www.rickschummer.com
>
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] 
> On
> Behalf Of Ajoy Khaund
> Sent: Thursday, April 02, 2009 01:33 PM
> To: [email protected]
> Subject: Re: Save fails sometimes Vfp9 Sp1
>
> App is single user. Fields of Parent 'Orders' table is on the form. The
> child records are displayed in a view. On 'Add' or 'Edit' to child records 
> a
>
> form appears where productid, qty, remarks etc are written & saved. Now
> sometimes after 'Save' when the form closes the record does not appear in
> the grid. Since u said data conflict. I did see a small error message once
> when the user was using. When can such errors occur. Any ideas will hep as
> this is a very simple form.
>
> Michael asked about whertype ? Any link ??? What should a wheretype
> generally be ???
>
>
> Regards
>
> Ajoy Khaund
> Neamati Road
> Near Bhogdoi Bridge
> Jorhat 785001-21
> Assam, India
>
> Tel: 91-376-2351288
> Cell: 91-94350-92287
> Mail: [email protected]
> Mail: [email protected]
>
> "Walking on water and developing software from a specification are easy if
> both are frozen."
> - Edward  V. Berard, "Life-Cycle Approaches"
>
> --------------------------------------------------
> From: "Rick Schummer" <[email protected]>
> Sent: Thursday, April 02, 2009 10:44 PM
> To: <[email protected]>
> Subject: RE: Save fails sometimes Vfp9 Sp1
>
>>>>Since it does not happen always and I cant reproduce it how do I trap 
>>>>the
>> error and save it to somewhere.<<
>>
>> If you cannot reproduce the problem, it likely is a data conflict as I
>> mentioned, but it could be a different bug.
>>
>> I already told you how to determine the problem (check the tableupdate 
>> and
>> use AERROR() to find the reason. Recording the error is up to you. Dump
>> the
>> array into a table or something simple like a text file.
>>
>> IF TABLEUPDATE() && check the parameters you need to pass for your cursor
>>   * All is well
>> ELSE
>>   * Not so well
>>   AERROR(laDataError)
>>   LIST MEMO LIKE laDataError TO FILE DataNotSaved.txt
>> ENDIF
>>
>> Bullet proof my code sample as needed for your customer environment.
>>
>> Rick
>> White Light Computing, Inc.
>>
>> www.whitelightcomputing.com
>> www.swfox.net
>> www.rickschummer.com
>>
>>
>>
>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/68776137c16c4f4d86afd134de9f9...@compaq
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to