|
 |
access thread: Access Ru n Tmie Error 3211 - HELP!!!!
Message #1 by "Tim Maher" <tim.maher@s...> on Mon, 29 Jul 2002 16:37:28
|
|
Im getting a "Run Time Error 3211".
" The database engine couldn't lock table "tablename" because it is alredy
in use by another person or process."
Ive got a Loop in my code which runs a set of make table and Crosstab
Queries. The first time the queries are run there is no problem.
However, on the second pass I get the Run Time Error on a make-table query.
I Have tried using DoCmd.Close acTable, "tablename" before the query-
set is run, but this doesnt seem to help.
I would massively appreciate it if you could offer any words of wisdom
about this... Its all that is holding this system back and its driving me
mad.
Thanks All!!
Tim
Message #2 by braxis@b... on Mon, 29 Jul 2002 16:57:20 +0100 (BST)
|
|
Tim
It sounds like your code isn't releasing all it's table locks. Are there any unfinished transactions of pending updates? If you post
the code, someone should be able to help.
Brian
> from: Tim Maher <tim.maher@s...>
> date: Mon, 29 Jul 2002 17:37:28
> to: access@p...
> subject: Re: [access] Access Ru n Tmie Error 3211 - HELP!!!!
>
> Im getting a "Run Time Error 3211".
>
> " The database engine couldn't lock table "tablename" because it is alredy
> in use by another person or process."
>
> Ive got a Loop in my code which runs a set of make table and Crosstab
> Queries. The first time the queries are run there is no problem.
> However, on the second pass I get the Run Time Error on a make-table query.
>
> I Have tried using DoCmd.Close acTable, "tablename" before the query-
> set is run, but this doesnt seem to help.
>
> I would massively appreciate it if you could offer any words of wisdom
> about this... Its all that is holding this system back and its driving me
> mad.
>
> Thanks All!!
>
> Tim
Message #3 by "Wesley Kendrick" <wez.k@n...> on Mon, 29 Jul 2002 23:46:32 +0100
|
|
Is this the same table every time?
Do you have any reports based on that table still open?
If you print the report Access seems to release the table as soon as the
report has been sent to the spooler, but if the report is open in preview
mode the table remains locked until you close the report. However if your
code is trying to move on to other things its too late to close the report
because the code has already been stopped by the error message.
Hope this helps, regards, Weskey Kendrick
----- Original Message -----
From: "Tim Maher" <tim.maher@s...>
To: "Access" <access@p...>
Sent: Monday, July 29, 2002 4:37 PM
Subject: [access] Access Ru n Tmie Error 3211 - HELP!!!!
> Im getting a "Run Time Error 3211".
>
> " The database engine couldn't lock table "tablename" because it is alredy
> in use by another person or process."
>
> Ive got a Loop in my code which runs a set of make table and Crosstab
> Queries. The first time the queries are run there is no problem.
> However, on the second pass I get the Run Time Error on a make-table
query.
>
> I Have tried using DoCmd.Close acTable, "tablename" before the query-
> set is run, but this doesnt seem to help.
>
> I would massively appreciate it if you could offer any words of wisdom
> about this... Its all that is holding this system back and its driving me
> mad.
>
> Thanks All!!
>
> Tim
>
Message #4 by "Tim Maher" <tim.maher@s...> on Tue, 30 Jul 2002 09:26:25 +0100
|
|
HI Buddy!
Thanks for taking the tinme to reply to my plea!!!!
Yes it s the same table every time! Its a make table query that creates
a onther table which anohter query is then run against (confusd???) In
my code I have the following function the loop :
-------------------------------------------------------------------------------------------
Public Function RunQueries()
DoCmd.OpenQuery "make_table_1", , acReadOnly
DoCmd.OpenQuery "make_table_2", , acReadOnly
DoCmd.OpenQuery "make_table_3" , , acReadOnly
DoCmd.OpenQuery "make_table_4", , acReadOnly (<-----Error on this
line)
DoCmd.OpenQuery "make_Crosstab_1", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_1"
DoCmd.OpenQuery "make_Crosstab_2", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_2"
DoCmd.OpenQuery "delete_query", , acReadOnly
DoCmd.OpenQuery "query_1", , acReadOnly
DoCmd.OpenQuery "make_Crosstab_3", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_3"
DoCmd.OpenQuery "make_Crosstab_4", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_4"
DoCmd.OpenQuery "query_2", , acReadOnly
DoCmd.Close acQuery, "query_2"
End Function
Ive tried running a DoCmd.Close acTable, "TableName" before this
function is called but this doesnt seem to help.
Any further hhelp would eb greatly appreciated!!
Sorry for getting back to you!!!
Very Best Regards
Tim Maher
>>> wez.k@n... 07/29/02 11:46pm >>>
Is this the same table every time?
Do you have any reports based on that table still open?
If you print the report Access seems to release the table as soon as
the
report has been sent to the spooler, but if the report is open in
preview
mode the table remains locked until you close the report. However if
your
code is trying to move on to other things its too late to close the
report
because the code has already been stopped by the error message.
Hope this helps, regards, Weskey Kendrick
----- Original Message -----
From: "Tim Maher" <tim.maher@s...>
To: "Access" <access@p...>
Sent: Monday, July 29, 2002 4:37 PM
Subject: [access] Access Ru n Tmie Error 3211 - HELP!!!!
> Im getting a "Run Time Error 3211".
>
> " The database engine couldn't lock table "tablename" because it is
alredy
> in use by another person or process."
>
> Ive got a Loop in my code which runs a set of make table and
Crosstab
> Queries. The first time the queries are run there is no problem.
> However, on the second pass I get the Run Time Error on a make-table
query.
>
> I Have tried using DoCmd.Close acTable, "tablename" before the
query-
> set is run, but this doesnt seem to help.
>
> I would massively appreciate it if you could offer any words of
wisdom
> about this... Its all that is holding this system back and its
driving me
> mad.
>
> Thanks All!!
>
> Tim
>
This e-mail transmission is strictly confidential and intended solely
for the person or organisation to who it is addressed. It may contain
privileged and confidential information and if you are not the
intended recipient, you must not copy, distribute or take any action
in reliance on it.
If you have received this email in error, please notify us as soon as
possible and delete it.
This e-mail has been scanned using Anti-Virus software, however,
Swansea NHS Trust accept no responsibility for infection caused by
any virus received on the recipients system.
Message #5 by jose.johnson@j... on Tue, 30 Jul 2002 17:50:35 +0900
|
|
Can you try this ?
Public Function RunQueries()
DoCmd.DeleteObject acTable, "table_1"
DoCmd.DeleteObject acTable, "table_2"
DoCmd.DeleteObject acTable, "table_3"
DoCmd.DeleteObject acTable, "table_4"
DoCmd.OpenQuery "make_table_1", , acReadOnly
DoCmd.OpenQuery "make_table_2", , acReadOnly
DoCmd.OpenQuery "make_table_3", , acReadOnly
DoCmd.OpenQuery "make_table_4", , acReadOnly (<-----Error on this
line)
DoCmd.OpenQuery "make_Crosstab_1", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_1"
DoCmd.OpenQuery "make_Crosstab_2", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_2"
DoCmd.OpenQuery "delete_query", , acReadOnly
DoCmd.OpenQuery "query_1", , acReadOnly
DoCmd.OpenQuery "make_Crosstab_3", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_3"
DoCmd.OpenQuery "make_Crosstab_4", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_4"
DoCmd.OpenQuery "query_2", , acReadOnly
DoCmd.Close acQuery, "query_2"
End Function
you can delte that object since it is no more required
May be this will solve your problem
tim.maher@s...
ales.nhs.uk To: access@p...
cc:
07/30/2002 05:26 PM Subject: [access] Re: Access Ru n Tmie Error 3211 - HELP!!!!
Please respond to
access
HI Buddy!
Thanks for taking the tinme to reply to my plea!!!!
Yes it s the same table every time! Its a make table query that creates
a onther table which anohter query is then run against (confusd???) In
my code I have the following function the loop :
-------------------------------------------------------------------------------------------
Public Function RunQueries()
DoCmd.OpenQuery "make_table_1", , acReadOnly
DoCmd.OpenQuery "make_table_2", , acReadOnly
DoCmd.OpenQuery "make_table_3" , , acReadOnly
DoCmd.OpenQuery "make_table_4", , acReadOnly (<-----Error on this
line)
DoCmd.OpenQuery "make_Crosstab_1", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_1"
DoCmd.OpenQuery "make_Crosstab_2", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_2"
DoCmd.OpenQuery "delete_query", , acReadOnly
DoCmd.OpenQuery "query_1", , acReadOnly
DoCmd.OpenQuery "make_Crosstab_3", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_3"
DoCmd.OpenQuery "make_Crosstab_4", , acReadOnly
DoCmd.Close acQuery, "make_Crosstab_4"
DoCmd.OpenQuery "query_2", , acReadOnly
DoCmd.Close acQuery, "query_2"
End Function
Ive tried running a DoCmd.Close acTable, "TableName" before this
function is called but this doesnt seem to help.
Any further hhelp would eb greatly appreciated!!
Sorry for getting back to you!!!
Very Best Regards
Tim Maher
>>> wez.k@n... 07/29/02 11:46pm >>>
Is this the same table every time?
Do you have any reports based on that table still open?
If you print the report Access seems to release the table as soon as
the
report has been sent to the spooler, but if the report is open in
preview
mode the table remains locked until you close the report. However if
your
code is trying to move on to other things its too late to close the
report
because the code has already been stopped by the error message.
Hope this helps, regards, Weskey Kendrick
----- Original Message -----
From: "Tim Maher" <tim.maher@s...>
To: "Access" <access@p...>
Sent: Monday, July 29, 2002 4:37 PM
Subject: [access] Access Ru n Tmie Error 3211 - HELP!!!!
> Im getting a "Run Time Error 3211".
>
> " The database engine couldn't lock table "tablename" because it is
alredy
> in use by another person or process."
>
> Ive got a Loop in my code which runs a set of make table and
Crosstab
> Queries. The first time the queries are run there is no problem.
> However, on the second pass I get the Run Time Error on a make-table
query.
>
> I Have tried using DoCmd.Close acTable, "tablename" before the
query-
> set is run, but this doesnt seem to help.
>
> I would massively appreciate it if you could offer any words of
wisdom
> about this... Its all that is holding this system back and its
driving me
> mad.
>
> Thanks All!!
>
> Tim
>
This e-mail transmission is strictly confidential and intended solely
for the person or organisation to who it is addressed. It may contain
privileged and confidential information and if you are not the
intended recipient, you must not copy, distribute or take any action
in reliance on it.
If you have received this email in error, please notify us as soon as
possible and delete it.
This e-mail has been scanned using Anti-Virus software, however,
Swansea NHS Trust accept no responsibility for infection caused by
any virus received on the recipients system.
|
|
 |