View Full Version : Error 2501


JACKSON
08-11-2004, 05:51 AM
Hi,

We have a backend access database with approx 12 remote workstations (BE file is on a server running Win 2000 Server). We have had some problems with specific users getting the error
# 2501
"The | action was canceled.@You used a method of the DoCmd object to carry out an action in Visual Basic, but then clicked Cancel in a dialog box.
For example, you used the Close method to close a changed form, then clicked Cancel in the dialog box that asks if you want to save the changes you made to the form.@@1@@1"

This usually happens when they try to save data just enetered on a form or tab to the next field, etc... It is almost like they have been put in some state where they can look at the record but not edit it. We resolve it by having them sign off, and reboot their PC and then sign back in and then they are usually fine. It is very sporatic and is not consistant. It happens with different users at different times, but usually on the same form, which is one of the more high volume forms. I am thinking they may be getting abruptly disconnected from the network, leaving them logged into the system or lock file, and when they sign back in they are unable to save changes ? Does this make sense ? IF so, is there anything we can do to protect aginst this ? We have put UPS units on every workstation. This office is using 2yr old DEll PC's with the built in NIC cards. WE have replaced NIC cards on one or two problem PC's and those susers have not had as many problems. However, this office staff is also using Dragon voice recognition software with our application, so that always throws a curve ball into things.

Any thoughts are greatly appreciated !

Thanks

jackson

The_Doc_Man
08-11-2004, 06:03 AM
Your surmise that some object is being locked can be tested. If a user gets this error, immediately find out what they were in and try to access the same object from another location. A lock for one is a lock for all!

Regarding Dragon, my wife uses that. Look really hard into the configuration they are using, in the sense that you want to know what characters it sends and when it sends them. 'cause all Dragon does is the equivalent of forcing characters down the keyboard driver's throat. (Access can do the same thing via the Shell function if my memory hasn't failed yet.)

I always wonder about extra layers of layered products between me and my main app, 'cause I don't always know what is being injected into the data stream. So I would look carefully at Dragon's settings. But that isn't to say it is bad. It is merely no better than its configuration settings allow it to be.

[After re-reading the details a bit more...] Also after this happens, have the users exit the form and re-enter it without actually exiting Access. It could also be a transient lock collision. If it affects only one user at a time, it is probably NOT a lock on the DB.

[After head-scratching] Another thing to try is to work with your file server's system admin. You might wish to request his assistance in running some netstat commands to see what sessions are currently active. He will know the commands necessary to tie back each connection to the user who had the problem. If you are correct and your user got disconnected, I would expect to see anomalies associated with that user's MAC or IP address. Either two connections or NO connections at a time when the user thinks s/he is connected once. I'm not saying you actually have network problems. This answer tells you how to test that at a quick-and-dirty level.

JACKSON
08-11-2004, 06:31 AM
Thanks Doc Man

That makes sense. You can definately access the same form and record from another workstation when this happens. It's very individual to the user. That's why I am leaning towards it having something to do with either the session on the server or lock file on access. It's almost like the system thinks that user is still logged in and when they log back in it's has them in twice, causing the second login not to be able to edit records. I am not even sure if that makes sense, but it just seems like what coul dbe happening. I wish MS Jet could handle network drops better.

Anyway, I think your right I should check with the network administrator, and I will check a little more into Dragon settings


Thanks

The_Doc_Man
08-11-2004, 10:23 AM
I wish MS Jet could handle network drops better.

This is actually a Windows problem. The file system locks don't do better for non-Access files, either.

If you can still access the item from elsewhere, it is not a Workgroup-resident lock, which eliminates a lot of issues.

Logging in twice from the same workstation is legal. You can prove this to yourself by clicking on a shortcut icon to your DB, then minimizing the window and clicking the same shortcut. You can get in twice.

(Don't try this at home without a LOT of memory and a honkin' big swap file.)