Cannot lock current record. record does not exist

I should probably change the “record does not exist” message to “this record has been deleted by another user”.

If, at that time, it’s possible to identify who “another user” was, that would be useful information for the administrator.

Panorama does not keep that information. It would take a huge amount of space to do that, but perhaps it could be kept in a separate log.

FYI, when a database is converted from Panorama 6, it isn’t really converted. Instead, a new database is created, and then populated with data, forms and procedure from the original database. These items aren’t copied over, however, they are created from new using the information in the Panorama 6 as a template. What I’m trying to convey is that there is no trace of “Panorama 6” in the new database, there is absolutely no way to tell that a database was created from Panorama 6 vs. being created new by hand.

I assume you didn’t have server logging enabled when this happened. That would be quite interesting. Based on the scenario you described, the bottom record should have a record ID of 5. You could verify this with the info(“serverrecordid”) function. Also, if you enabled logging on the server and tried to edit the record, you should see that it is trying to lock record 5. Of course this is 3 days later so probably you can’t try it any more.

When I have my ‘record does not exist’, it is happening on a shared file that no one else has. I do have server logging enabled. It happens with some regularity.

I wasn’t suggesting that enabling logging would change the way the program behaved. I was suggesting that having a log might be able to enable a more specific problem report. For example, “the log says record 25 doesn’t exist, but that record does exist on both my client and the server” (the latter could be verified by re-downloading the database from the server). Or, “the log says record 25 doesn’t exist but there is no record in the log of 25 being deleted.” That sort of thing. Of course the logging would have to be fully enabled, including for individual records, to see this type of information.

image

Of course I did - and do! :smirk:

I’ve trimmed redundant info from each line for clarity:

|2:47:23 pm|opened shared database: ChoresDB|
|2:47:50 pm|locked record 2 of database: ChoresDB|
|2:48:00 pm|committed modified data to record 2 of database: ChoresDB (ts: 1)|
|2:48:02 pm|locked record 3 of database: ChoresDB|
|2:48:03 pm|committed modified data to record 3 of database: ChoresDB (ts: 2)|
|2:48:04 pm|locked record 4 of database: ChoresDB|
|2:48:05 pm|committed modified data to record 4 of database: ChoresDB (ts: 3)|
|2:48:05 pm|locked record 5 of database: ChoresDB|
|2:48:06 pm|committed modified data to record 5 of database: ChoresDB (ts: 4)|
|2:48:06 pm|RECORD LOCK ERROR: Cannot lock record: 6 in database: ChoresDB (record does not exist)|
|2:48:10 pm|RECORD LOCK ERROR: Cannot lock record: 6 in database: ChoresDB (record does not exist)|
|2:48:21 pm|locked record 2 of database: ChoresDB|
|2:48:23 pm|committed modified data to record 2 of database: ChoresDB (ts: 5)|
|2:48:26 pm|RECORD LOCK ERROR: Cannot lock record: 6 in database: ChoresDB (record does not exist)|
|2:48:43 pm|RECORD LOCK ERROR: Cannot lock record: 6 in database: ChoresDB (record does not exist)|
|2:50:55 pm|uploaded modified data to unlocked record 6 of database: ChoresDB (ts: 6)|
|2:51:01 pm|locked record 6 of database: ChoresDB|
|2:51:07 pm|committed modified data to record 6 of database: ChoresDB (ts: 7)|

It’s days later, so my ability to recall all details is diminished but there may be something here. This was a brand new share and I’m quite sure that the five records were imported before I shared it. I don’t recall if I chose Replace or Append, but would Appending to an empty database possibly cause a faulty count?

At 2:50 is where I used the Option key and Upload Record

I wasn’t thinking of permanent storage of “who did what” - more of a rolling short-term look back.

For example, on tracking Tutor Hours, I knew that the data entry would be done by students with different degrees of … concern for the accuracy of their work; plus, perhaps a misguided need to “express their independence” rather than follow directions. So I built two checks. 1) As a record was added, it was given a sequence number. Periodically, I could compare the highest sequence number with the record total. If there were a big difference, that meant, for one reason or another, someone had deleted a bunch of records. 2) I’d back up to a different folder for each day of the week. That way I had a rolling week of activity. If there were some anomaly, I could go back a week and see when it occurred and find out who was the data entry person at that time. I toyed with the idea of having the data entry person log in, but sometimes students switch schedules and it would be really easy to use someone else’s Log-In. I’ve seen it happen all the time in commercial situations. It’s not supposed to, but it happens.

In the situation at hand, It’s more some hiccup in the mechanics of the database interaction.

I’m influenced by what I’d see in the EHR (electronic health record) industry. There would be these Strong rules about who could look at which medical records (you were not supposed to look at your own, or any patient no in the nurse’s department - it was a firing offense) But there was no attempt to track who was looking at whom - until a little Panorama 6 and SQL could pull off activity and match patient names with record seekers. :grinning:

The point is, it’s good to have some mechanism of review about who is doing what in the database.
As Jim suggested - part of the design could be a short-term activity log. I don’t know if the built-in Server Log would provide that kind “who is looking at what” info.

I tried to see if I could duplicate this problem. I actually uploaded the database with one record, then appended 5 lines from a text file after the file was already shared. So there were six records total. Then I walked down from top to bottom modifying each row, as you said you did.

Jim’s 13" M1 MacBook Pro:Jim Rea uploaded database TeensieMailingList
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea ) resuming previous session
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) opened shared database: TeensieMailingList
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) synchronized database: TeensieMailingList (ts:0-0 changed:0 deleted:0)
Jim’s 13" M1 MacBook Pro:Jim Rea uploaded file data_3c0630032f2d_2022_04_05_14_15_05_883
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) imported 5 records into database: TeensieMailingList (recordid:2-6 ts:1)
Saved database: TeensieMailingList (records:6 ts:1)
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) locked record 1 of database: TeensieMailingList
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) committed modified data to record 1 of database: TeensieMailingList (ts: 2)
Saved database: TeensieMailingList (records:6 ts:2)
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) locked record 2 of database: TeensieMailingList
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) committed modified data to record 2 of database: TeensieMailingList (ts: 3)
Saved database: TeensieMailingList (records:6 ts:3)
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) locked record 3 of database: TeensieMailingList
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) committed modified data to record 3 of database: TeensieMailingList (ts: 4)
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) locked record 4 of database: TeensieMailingList
Saved database: TeensieMailingList (records:6 ts:4)
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) committed modified data to record 4 of database: TeensieMailingList (ts: 5)
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) locked record 5 of database: TeensieMailingList
Saved database: TeensieMailingList (records:6 ts:5)
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) committed modified data to record 5 of database: TeensieMailingList (ts: 6)
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) locked record 6 of database: TeensieMailingList
Saved database: TeensieMailingList (records:6 ts:6)
Session 2 (Jim’s 13" M1 MacBook Pro:Jim Rea) committed modified data to record 6 of database: TeensieMailingList (ts: 7)
Saved database: TeensieMailingList (records:6 ts:7)

Hmm, you say that you appended from a database, not from a text file. If it was done before uploading, it shouldn’t matter. When the database is uploaded, all server record id’s are reset sequentially from 1 to the number of records (1, 2, 3, …). In fact, this happens every time you do a new generation.

So it’s very odd that it looks like the record numbers in your client database start at 2 and go to 6, instead of from 1 to 5. I’d really like to know more about exactly how you appended to this database, it sounds like that might be the root of the problem but I can’t duplicate it. Are you sure you appended before uploading to the server, and not after? Not that it shouldn’t work either way. But if done after uploading, the “Replace Existing Data” option shouldn’t be available. And it shouldn’t matter, but was the database you appended from a shared database?

As noted, it has been some days since, so… but the logs did not show the append, while they do show an append a day later. I took that as evidence that the append was prior to the sharing.

The data came from a formerly shared db, that was downloaded from the sevrer. In order to open a Pan6 file in PanX, it needs to be brought out of Author Mode but I can’t vouch for the sharing mode one way or the other at this point.

After replacing two databases on a web server, efforts to edit are being met with an error that the record does not exist.

I started by simply setting the files for Sharing and Web Publishing, then clicking OK when I was told the databases already existed on the server and did I want to delete them. All seemed to go well but a moment later when I needed to edit some data, I got the error.

At that point I converted the files from sharing mode to single user then deleted the copies on the server through Server Administration. I then uploaded them again as newly shared databases.

I tried editing and it worked for the field I tried. I closed the files and re-opened them and once again could not edit.

I have not tried relaunching anything on the server and prior to this I don’t recall any attempt to edit shared/web server files so it’s impossible to say if this is a change in behavior.

Screen Shot 2022-06-03 at 1.09.14 PM

I clicked on the fan icon to synchronize data and was able to edit one record but no others. This didn’t seem repeatable with other records.

Lots of logging is available.
The files do perform properly for the web serving.

FYI, Panorama 6 allowed a database to be web published but not shared, but Panorama X does not allow that. All files on the server are shared.

Let me see if I understand the sequence.

  1. You upload the database to the server.
  2. Without doing anything else, you attempt to edit a record and you get this error.

Is that right?

Did you mean to say that it worked for the record you tried? Record locking is tied to records, not fields.

Were you trying to edit the same record?

The error message indicates that this database has at least 113411 records. Is that correct, does the database really have that many records? You can verify this record number by opening the Formula Workshop and using the function info(“serverrecordid”). The number you get should match the error message.

If this is a somewhat reproduceable problem I may want to get a copy of this database. Or maybe I can zoom onto your computer for a debug session.

I tried to be very clear, but there are always holes, so let me fill a few and add some additional info.

I didn’t recall any previous attempts to edit these particular files after they were first shared some weeks ago. I uploaded replacements yesterday, and I believe that I then closed my local copies. Then I noticed an error in the data and attempted to correct it. That was when I got the error and found I could not edit anything.

After setting my copies back to single user, I deleted the files on the server and uploaded the databases again. In all cases they’ve been uploaded for Sharing and Web Publishing. I tried immediately to edit a random record and it worked as expected. I tried other records and got the error. I closed the files and tried again. The error persisted for all records that I tried. The one that had worked was chosen at random so I don’t know if it was one of those that failed at this point.

( I erred yesterday in my reference to field when I meant record)

In attempting to answer your question about the number of records I opened the files this morning and got a message that 2 records were updated. I was able to edit the first two but all others that I try continue to “not exist”.

The second database updates 1 record when opened and the first record can be edited, but not any others that I’ve found.

Info(“ServerRecordID”) yields 113413 in one and 73300 in the other. They have 6619 and 6618 records respectively.

The site has yet to go live so I can provide copies of the databases for your scrutiny.

Ok, wow, that’s definitely wrong.

If possible, I think what I would like is copies of both the client and the server database. And if you can tell me how to find the records with the problem that would be helpful.

They’ve been sent

Thanks, I received them, haven’t done anything with them yet though. Once again, the message did NOT go into the spam folder, so maybe whatever was causing your email to redirect to spam has been resolved.