Alpha Video Training
Results 1 to 14 of 14

Thread: "Database is open in another session" error

  1. #1
    Member
    Real Name
    Michael Beecher
    Join Date
    Sep 2003
    Posts
    36

    Default "Database is open in another session" error

    When I am editing my database, I keep running into error messages telling me that "The database/set is being used by another user or in another session and could not be opened in exclusive mode." But I am the only person on our network accessing this database! (We have a 3-user license.) I also do not have any other browses or forms open! Why is this happening?

  2. #2
    Member Beltronics's Avatar
    Real Name
    Jim Belanger
    Join Date
    Feb 2001
    Location
    Hollis NH
    Posts
    544

    Default

    I have the same problem. When it happens, I have to shut down the program and start it up again. And I am using it on a stand alone computer, not on a network, although I have the networking version.
    Jim Belanger

  3. #3
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default

    This message from Alpha Five is based on information Alpha Five receives from the operating system. Tables and sets can be left "open" as far as Windows is concerned even after you close the database. This can happen if a table is opened by a script that subsequently crashes. I've had this happen during development more times than I'd care to admit. It also happens when developers open forms "as dialogs" and do not close them correctly, following the special handling instructions set forth in the help file. The immediate problem can usually be cleared by closing Alpha Five and rebooting your workstation (if the database is stored there). If your database is on a "server", then rebooting it is sometimes required. This is why, in my own development work, I don't put anything on the server until it's been thoroughly tested. Rebooting a shared server affects more folks than rebooting your own pc.

    The long term solution is to find what's causing tables or sets to be left open and correct it. A useful technique at the end of any development session is to compact the database. If Alpha Five can't compact some of the tables that's a good indicator that they were left open by mistake.

    --tom

  4. #4
    Member Beltronics's Avatar
    Real Name
    Jim Belanger
    Join Date
    Feb 2001
    Location
    Hollis NH
    Posts
    544

    Default

    I can't find it right now, but, at one time I had a similar problem and someone told me to look for a file in the directory and delete it. It was a file that indicated a table was open. Wish I could recall the file's name or where I wrote this hint down.
    Jim Belanger

  5. #5
    VAR
    Real Name
    Mike Reed
    Join Date
    Apr 2000
    Location
    Phoenix, AZ
    Posts
    668

    Default

    Hi,
    I have the same issue on occasion, so I go to the interactive window and type in a5_forceclosetables().
    That usually does the trick.

    And thanks Tom for your advise on finding our why a table or set is open in the first place. That should, as a matter of course, be done.

    mike
    Mike Reed
    Phoenix, AZ

  6. #6
    Member
    Real Name
    Michael Beecher
    Join Date
    Sep 2003
    Posts
    36

    Default

    This seems to be a major failing of this program and one that should be addressed ASAP in the next revision. I mean, seriously, am I supposed to keep rebooting the workstation constantly? This makes Alpha Five practically unusable for me.

  7. #7
    Member
    Real Name
    Michael Beecher
    Join Date
    Sep 2003
    Posts
    36

    Default

    a5_forceclosetables() did not work for me.

  8. #8
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default

    Michael,

    I don't think I agree with your premise. Perhaps we can spot the trouble for you if you'll post your database here, with instructions for us to follow to see the issue.

    -- tom

  9. #9
    Member
    Real Name
    Michael Beecher
    Join Date
    Sep 2003
    Posts
    36

    Default

    I'm not comfortable posting the database here. I just went through my system processes and shut down programs that might be accessing files in the background (like X1 and System Mechanic system monitor). I'll let you know if that helps.

    FYI: I'm a long-time Alpha Four user and am (finally) making the transition to Alpha Five. So I'm a total novice at Alpha Five. I will probably be posting lots of questions!

  10. #10
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default

    It's possible to get thing so screwed up that the tables and database can become corrupted. So it pays to keep good backups even during development. (Especially during development!!). It's also possible for hardware failures of various types to cause corruption. If you think it would help for someone to check the database privately just post a request.

    -- tom

  11. #11
    Member
    Real Name
    Michael Beecher
    Join Date
    Sep 2003
    Posts
    36

    Default

    Terminating X1 and System Mechanic seems to have done the trick. I've been editing a table for 40 minutes now and haven't run into the problem.

  12. #12
    Member
    Real Name
    Bill Jordan
    Join Date
    Feb 2001
    Posts
    279

    Default

    Michael,
    I've had the same problem but haven't been able to see a pattern that would help me figure out where to look, because it doesn't happen consistently. I do compacts frequently enough but that doesn't seem to have any impact. Don't know the solution, just letting you know you're not alone.
    Good luck.

  13. #13
    Member dpawley's Avatar
    Real Name
    David Pawley
    Join Date
    Sep 2005
    Location
    Denver, Colorado
    Posts
    133

    Default

    Not sure if it causes a problem but to be safe I exclude table and index file types from Anti-virus/spyware scanning.
    Dave

  14. #14
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,953

    Default

    if this happens only when you are in development mode, I would say there are 2 general reasons you will get this error
    1. if you open a form as a dialog from another form, and do not then close it from the calling form, it is still open (but hidden) and its table is thus open, too.

    2. if you make changes to a form that cause an error, as from bad syntax, the table and frequently even the form are still open - and if you then reopen the form in design mode, correct the changes, and then rerun it again, not only can you get an error indicating the table and/or a record is locked, but you can also create a mess with the syntax. Since there were 2 copies of the form open, often the objects on the 2nd form are renamed to objectname0 since one copy is already open (but hidden) with the object name.

    My practice in V7 is this - if I am developing in a layout and I get an error, I close Alpha and reopen it.

    But if you are not getting any errors, and it only occurs when using the program, if the cause is from wothing the program, then something is opening a table but not closing it - like a script/function or a form opened as a dialog but not properly closed.

Similar Threads

  1. Intermittent "not an open index" fault
    By Richard Dean in forum Alpha Five Version 4
    Replies: 0
    Last Post: 07-03-2003, 07:44 AM
  2. Setting directory for "Open a Database"
    By Marvin Fletcher in forum Alpha Five Version 5
    Replies: 7
    Last Post: 08-27-2002, 12:57 PM
  3. Alpha Warning box "Not an open Index"
    By Mike Cameron in forum Alpha Five Version 4
    Replies: 18
    Last Post: 04-19-2002, 05:51 AM
  4. Order of files in "Open database" dialog
    By Jim Cooper in forum Alpha Five Version 4
    Replies: 2
    Last Post: 12-06-2001, 05:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •