Results 1 to 6 of 6

Thread: Erro com Access: The database has been placed in a state by user 'Admin'...

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    8

    Exclamation Erro com Access: The database has been placed in a state by user 'Admin'...

    Pessoal,

    Estou com um problema sério utilizando o Access. Eu desenvolvi uma aplicação que vai rodar em vários PCs e acessar o mesmo banco de dados que fica num servidor, e essa aplicação tem um sistema de refresh, ou seja, a cada 5 segundos ela busca dados no banco para atualizar o status do form principal.. O problema é que quando mais de um PC estiver rodando a aplicação eu começo a receber um mesmo erro, e quanto mais PCs estiverem rodando mais frequente fica o erro, tornando a utilização do software impossível.

    Erro: The database has been placed ina a state by user 'UserName' on machine 'ComputerName' that prevents it from being opened or locked.

    Pesquisando sobre esse erro eu percebi que é algo que comumente acontece quando se utiliza banco de dados Access num servidor com varias máquinas acessando-o simultaneamente.

    O que ja tentei e não deu certo:
    - Eu ja configurei o banco para Shared (Compartilhado) e o deixei sem bloqueios no Access.
    - Chequei se todas as conexões feitas com o banco de dados estavam sendo fechadas devidamente (con.Close()).

    Espero que possam me ajudar...

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Erro com Access: The database has been placed in a state by user 'Admin'...

    I can only pick out bits and pieces of that... but the error message is plain and clear: someone has opened the Access database with an exclusive lock. This prevents anyone else from being able to open it.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    8

    Re: Erro com Access: The database has been placed in a state by user 'Admin'...

    Sorry, i'm gonna put in english now..

    Guys,

    I have a serious problem using MS Access. I developed an application that will be running in various PCs and will access the database placed in a server, and this application has a refresh system, every 5 secs it searches data in the db to refresh the status in the main form... The proble is that when more then one PC is running the application it starts to give me this error, and the bigger is the number of PCs accessing the DB the most frequent become the error, making the use of the software almost impossible.

    Error: The database has been placed ina a state by user 'UserName' on machine 'ComputerName' that prevents it from being opened or locked.

    Searching about that error i've noticed that it is something tha usually happens when many PCs try to access a DB from MSAccess simultaneously.

    What I've tryed and didn't work:
    -Configured the DB to Shared and removed any locks in the MSAccess.
    -Checked if every connection opened with the DB was properly cosed (con.Close()).

    I hope you can help me...

    And I think it is not that someone has openned it with exclusive lock... but if there is a away I can find out, please tell me...
    Last edited by gabrielSbrug; May 23rd, 2012 at 09:03 AM.

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Erro com Access: The database has been placed in a state by user 'Admin'...

    hmmmm.... ok, the picture is a little more clearer now. Have you thought about dumping Access in favor something that is more multi-user friendly. Like SQL Server, Oracle or even MySQL. It sounds like you've exceeded the limits of Access, which is file based, and hitting it as often as you are (every client, every 5 seconds) it's going to get corrupted fairly quick. You may want to go with something more server oriented that scales better.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    8

    Re: Erro com Access: The database has been placed in a state by user 'Admin'...

    Yeah, i've thought of that too, because access is no more than organized data... this call was just to see if there were other option like error handling or something, because besides the error, if you press continue when it happens, the software keeps working until there's another error.

    Is there a procedure that can catch a specific error whenever it happens? if so, maybe it would help..

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Erro com Access: The database has been placed in a state by user 'Admin'...

    well, you could use a try catch in some kind of a loop until it's successful... but it doesn't really solve the problem... it just hides it, know what I mean?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width