Hi.
By chance, do you know if there is an ADO equivalent to this?
There is no equivalent in ADO. ADO is a generic library to handle
connections, data sets, record locking and transactions. It wasn't designed
for Jet. It was never meant to handle any particular database's settings,
for that matter.
Since this is a one-time thing, set a Reference to the DAO 3.6 Object
Library but place it below the ADO 2.x Object Library in the hierarchy, close
the References dialog window, and compile the database code. Run the code I
suggested earlier in the Immediate Window as many times as you need to during
your experimentation. When you are finished, get rid of the DAO Reference,
close the References dialog window, and compile the database code again.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
:
Thanks,
By chance, do you know if there is an ADO equivalent to this?
:
Hi.
I really don't want to alter my registry settings (if that is what this is
saying) unless I really need to.
It appears that you do need to increase your MaxFileLocks setting because of
the number of records in the table. However, this doesn't need to be a
permanent setting, so you aren't required to change the Windows Registry
(unless this is a common occurrence, and then you'd want to).
One may change the setting for the current session by changing the Jet
DBEngine setting. To do so, open the Immediate Window by opening the VB
Editor and typing <CTRL><G>. Type the following in the Immediate Window,
then press <ENTER>:
DAO.DBEngine.SetOption dbmaxlocksperfile, 15000
This setting is only temporary, so don't worry. Try running the query and
if you get the same error message, then type this into the Immediate Window
again, but this time increase the number. You may need to do some
experimenting to find how many locks is enough to handle this transaction.
If you'd like instructions on the Window Registry method to make it
permanent, then please see the following Web page:
http://support.microsoft.com/default.aspx?id=815281
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
:
I am using Office 2003 on Windows XP.
I am attempting to alter the data type of a single field in a stand-alone DB
that only has one table. The DB is in a private directory where only I have
access to it. The table is populated with 148,449 records. My SQL is:
ALTER TABLE [tablename] ALTER COLUMN [fieldname] Double;
Currently the field type is TEXT. When I run this SQL (from MS-Excel), I get:
-2147467259 (80004005)
File sharing lock count exceeded. Increase MaxLocksPerFile registry.
When I run the query in MS-Access, it runs for a while, then just hangs.
I really don't want to alter my registry settings (if that is what this is
saying) unless I really need to. Can someone tell me what is going on and how
to fix or work-around this?
Thanks much in advance.