Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with error
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Help with error
Miscellaneous
Thread ID:
00170932
Message ID:
00170932
Views:
47
What am I missing? (Pardon that some of this info will obviously be irrelevant to what's wrong)

I have a form which is for batch entering new records. Users fill in the top of the form once, then fill in the bottom half of the form and hitting save over and over again until done with a batch.

In the load event of the form, I'm selecting the table it updates and doing CURSORSETPROP("Buffering", 5) (optimistic table). The save button is supposed to check that some things are valid, fill in three auto-ID type variables (sounds stupid in one table but there's a reason), and do a TABLEUPDATE(.T., .F.) to commit the new record (and others which may have had a flag flipped by saving this record).

This worked fine until I realized I hadn't entered the code for updating the auto-updated ID fields, and added it before the TABLEUPDATE() command. Now, after two replace commands fire ok (REPLACE first ID field WITH udf(), if second ID field is empty REPLACE it WITH udf2()), the third replace command gives me a "Record is not locked" error.

I've checked the obvious. The first two udfs do NOT move the primary table's record pointer or issue an unlock command on it. (The second one was doing an unlock on it, but I fixed it.)

Is the record I'm appending getting unlocked by selecting a different table? Naturally I have multilocks on or I couldn't have buffering on, and that shouldn't be relevant anyway, but ... I'm so confused!

TIA,
Rich Addison, ERW, Inc., Southfield, MI
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Next
Reply
Map
View

Click here to load this message in the networking platform