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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record in use by another user

Status
Not open for further replies.

badscots

Programmer
Dec 23, 2003
19
GB
Hello all,

Not this old chestnut I hear you say...

Here we go; I have an app. in a multi-user environment using optimistic buffering. If user 1 edits the same record as user 2 Ive trapped the error to prompt a message box "Record in use by another, please try again", but then the app exits.

I can only assume that its called the forms destroy event and quits, but I dont want it to quit! Any one any idea's on how to stop the exit of the program???

TX's in advance

IanMc
 
Hello Dave,

Something weird going on here! I checked the whole program for cancel,quit,release etc, nothing here. I then used debugger and it worked??? After my error message it goes back to READ EVENTS (Exactly what I want). When I run two instances of the app. without debugger I get the error message ive coded and it still crashes? :(

Am I missing something really obvious here?

IanMc
 
Hello BadScots.

>> Ive trapped the error to prompt a message box "Record in use by another, please try again", but then the app exits. <<

Perhaps if you post some of the code, we can help you to determine what the problem is.



Marcia G. Akins
 
Hello all,

After a lot of RTFM's I think Ive solved it:

Originally I had the below in a errorroutine.prg...

DO CASE
CASE merror=109
Messagebox("Record in use by another user, please try again",0+16+0,"Record in use")
ENDCASE

...which kept on bombing out. I then added...

DO CASE
CASE merror=109
nAnswer =Messagebox("Record in use by another user, please try again",5+48+512,"Record in use")
DO CASE
CASE nAnswer = 3 &&Abort
CANCEL
CASE nAnswer = 4 &&Retry
RETRY
OTHERWISE && Ignore
RETURN
ENDCASE
ENDCASE

and the RETRY option does what I need it to do (Fingers crossed), unless someone spots/knows a better way?

IanMc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top