|
-
May 23rd, 2012, 08:08 AM
#1
Thread Starter
New Member
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...
-
May 23rd, 2012, 08:16 AM
#2
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
-
May 23rd, 2012, 08:28 AM
#3
Thread Starter
New Member
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.
-
May 23rd, 2012, 11:09 AM
#4
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
-
May 23rd, 2012, 11:58 AM
#5
Thread Starter
New Member
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..
-
May 23rd, 2012, 12:11 PM
#6
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
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|