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!

Problem with WIZBTNS class – “Data has been changed by another user”

Status
Not open for further replies.

CFPR

MIS
May 9, 2003
58
PR
Hi folks. I need some debugging tips. I’m using VFP8 with remote views to SQL 2000. My very simple forms has about 15 fields using the wizbtns class for add / edit / undo / print etc. with buffering set to 5 (Table).

The problem is that on addmode when I click the ‘save record’ I get the error ‘Data has been changed by another user, Overwrite with yours?”. Pretty impossible as I am the only one working in the system – I am at home alone on a 4th of july coding?!??D!

Facts: Prior to calling the class (cmdadd::click or dodefault) I do a few ‘replaces’ like date stamp, user, etc., but I am not moving the pointer. If I click add, then save with out entering info on the fields, it works fine. The problem is when I add data and the press ‘Save’. Boom.

Like always, thanks for your comments.
 
I would say that it is the field replacements you are making prior to the call to click event that are causing the update conflict...I don't work a lot with the wizards so I am not privy (off the top of my head) to the code at work here but it would seem to me that you should tableupdate your changes before calling the click event...as to the record pointer not moving it shouldn't effect you either way since you are in Table Buffering mode. July 4th - Ahhhhh, I'm actually getting some work done since it is a holiday...on an ordinary day I would be stuck in meeting after meeting and then the boss would want to have another meeting with me to figure out why I haven't gotten any code written during the day. :)

Slighthaze = NULL
 
Hello Slighthaze. Thanks for the response. I finally figured it out. It was a =tableupdate() in my code that should not have been there. It simply was changing the state on the cursor prior to the class being called. No wonder the 'class' got lost...

Anyway, I can certainly relate to your meeting issues and time for coding. I'm involved in a 'huge' project and can't seen to get a good 'progamming' flow because of all the meetings and interruptions. Good thing I'm kind of a night person and get a lot done from 9:30p to 1-2am and on holydays. Good thing my wife understands this.

Anyway, Happy 4th of july to you to.

MW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top