PC Review


Reply
Thread Tools Rate Thread

Can't compact -- error 335

 
 
=?Utf-8?B?QmlsbCBCcmlua3dvcnRo?=
Guest
Posts: n/a
 
      28th Feb 2005
I had this compacting routine working for days in my access 2003 program,
then i ran it this morning and got a "you attempted to open a database that
is already opened exclusively by user admin in machine.... (runtime error
3356). I rebooted machine. Nothing else is using it, and as i said it was
running fine in the past. How in the world can i get it to work, i even
added code to close it, buut still...

yes there is a .ldb open on the db..but it worked b4!

here's what i have:
'i just added this..but it doesn't help
Set dbWCData2003 = OpenDatabase("c:\bcs\worldchildren\wcdata2003.mdb")
With dbWCData2003
.Close
End With

'''
DBEngine.CompactDatabase "c:\bcs\worldchildren\wcdata2003.mdb",
"c:\bcs\worldchildren\wcdata2003Compact.mdb"

thank you for your time and help!!!!...in advance....

 
Reply With Quote
 
 
 
 
Ken Snell [MVP]
Guest
Posts: n/a
 
      28th Feb 2005
If an .ldb file exists for the file before you open it, that file will not
compact when you close it. Delete the .ldb file (assuming that no one else
is working in the database) before you open the file, and then it should
work.


--

Ken Snell
<MS ACCESS MVP>

"Bill Brinkworth" <(E-Mail Removed)> wrote in
message news:6880CA32-08C1-4442-9A35-(E-Mail Removed)...
>I had this compacting routine working for days in my access 2003 program,
> then i ran it this morning and got a "you attempted to open a database
> that
> is already opened exclusively by user admin in machine.... (runtime error
> 3356). I rebooted machine. Nothing else is using it, and as i said it
> was
> running fine in the past. How in the world can i get it to work, i even
> added code to close it, buut still...
>
> yes there is a .ldb open on the db..but it worked b4!
>
> here's what i have:
> 'i just added this..but it doesn't help
> Set dbWCData2003 = OpenDatabase("c:\bcs\worldchildren\wcdata2003.mdb")
> With dbWCData2003
> .Close
> End With
>
> '''
> DBEngine.CompactDatabase "c:\bcs\worldchildren\wcdata2003.mdb",
> "c:\bcs\worldchildren\wcdata2003Compact.mdb"
>
> thank you for your time and help!!!!...in advance....
>



 
Reply With Quote
 
=?Utf-8?B?QmlsbCBCcmlua3dvcnRo?=
Guest
Posts: n/a
 
      28th Feb 2005
It is a linked table. It always has a ldb file. If i go to the table alone,
it compacts, but will not from the front end.

"Ken Snell [MVP]" wrote:

> If an .ldb file exists for the file before you open it, that file will not
> compact when you close it. Delete the .ldb file (assuming that no one else
> is working in the database) before you open the file, and then it should
> work.
>
>
> --
>
> Ken Snell
> <MS ACCESS MVP>
>
> "Bill Brinkworth" <(E-Mail Removed)> wrote in
> message news:6880CA32-08C1-4442-9A35-(E-Mail Removed)...
> >I had this compacting routine working for days in my access 2003 program,
> > then i ran it this morning and got a "you attempted to open a database
> > that
> > is already opened exclusively by user admin in machine.... (runtime error
> > 3356). I rebooted machine. Nothing else is using it, and as i said it
> > was
> > running fine in the past. How in the world can i get it to work, i even
> > added code to close it, buut still...
> >
> > yes there is a .ldb open on the db..but it worked b4!
> >
> > here's what i have:
> > 'i just added this..but it doesn't help
> > Set dbWCData2003 = OpenDatabase("c:\bcs\worldchildren\wcdata2003.mdb")
> > With dbWCData2003
> > .Close
> > End With
> >
> > '''
> > DBEngine.CompactDatabase "c:\bcs\worldchildren\wcdata2003.mdb",
> > "c:\bcs\worldchildren\wcdata2003Compact.mdb"
> >
> > thank you for your time and help!!!!...in advance....
> >

>
>
>

 
Reply With Quote
 
Ken Snell [MVP]
Guest
Posts: n/a
 
      28th Feb 2005
Not sure what you mean by "from the front end", but if you're thinking that
the backend will compact when you close the front end, the answer is no.

So long as there is a locking file on the database file, you can't compact
it via code (to my knowledge).


--

Ken Snell
<MS ACCESS MVP>

"Bill Brinkworth" <(E-Mail Removed)> wrote in
message news:A900924D-478C-4AE4-B6DC-(E-Mail Removed)...
> It is a linked table. It always has a ldb file. If i go to the table
> alone,
> it compacts, but will not from the front end.
>
> "Ken Snell [MVP]" wrote:
>
>> If an .ldb file exists for the file before you open it, that file will
>> not
>> compact when you close it. Delete the .ldb file (assuming that no one
>> else
>> is working in the database) before you open the file, and then it should
>> work.
>>
>>
>> --
>>
>> Ken Snell
>> <MS ACCESS MVP>
>>
>> "Bill Brinkworth" <(E-Mail Removed)> wrote in
>> message news:6880CA32-08C1-4442-9A35-(E-Mail Removed)...
>> >I had this compacting routine working for days in my access 2003
>> >program,
>> > then i ran it this morning and got a "you attempted to open a database
>> > that
>> > is already opened exclusively by user admin in machine.... (runtime
>> > error
>> > 3356). I rebooted machine. Nothing else is using it, and as i said
>> > it
>> > was
>> > running fine in the past. How in the world can i get it to work, i
>> > even
>> > added code to close it, buut still...
>> >
>> > yes there is a .ldb open on the db..but it worked b4!
>> >
>> > here's what i have:
>> > 'i just added this..but it doesn't help
>> > Set dbWCData2003 = OpenDatabase("c:\bcs\worldchildren\wcdata2003.mdb")
>> > With dbWCData2003
>> > .Close
>> > End With
>> >
>> > '''
>> > DBEngine.CompactDatabase "c:\bcs\worldchildren\wcdata2003.mdb",
>> > "c:\bcs\worldchildren\wcdata2003Compact.mdb"
>> >
>> > thank you for your time and help!!!!...in advance....
>> >

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?Si5DLlJpdmVyYQ==?=
Guest
Posts: n/a
 
      27th Apr 2005
Greetings, Ken...

I'm having this problem, too. Even more, I included a code that checks for
the existance of the .ldb so that it kills it (Kill command). However, I get
an error 70 ("Permission denied") when executes the Kill. Apparently, this
..ldb is being in use by the .mdb itself and doesn't let to be deleted.

Any suggestions?

Thanks.

J.C.


"Ken Snell [MVP]" wrote:

> Not sure what you mean by "from the front end", but if you're thinking that
> the backend will compact when you close the front end, the answer is no.
>
> So long as there is a locking file on the database file, you can't compact
> it via code (to my knowledge).
>
>
> --
>
> Ken Snell
> <MS ACCESS MVP>
>
> "Bill Brinkworth" <(E-Mail Removed)> wrote in
> message news:A900924D-478C-4AE4-B6DC-(E-Mail Removed)...
> > It is a linked table. It always has a ldb file. If i go to the table
> > alone,
> > it compacts, but will not from the front end.
> >
> > "Ken Snell [MVP]" wrote:
> >
> >> If an .ldb file exists for the file before you open it, that file will
> >> not
> >> compact when you close it. Delete the .ldb file (assuming that no one
> >> else
> >> is working in the database) before you open the file, and then it should
> >> work.
> >>
> >>
> >> --
> >>
> >> Ken Snell
> >> <MS ACCESS MVP>
> >>
> >> "Bill Brinkworth" <(E-Mail Removed)> wrote in
> >> message news:6880CA32-08C1-4442-9A35-(E-Mail Removed)...
> >> >I had this compacting routine working for days in my access 2003
> >> >program,
> >> > then i ran it this morning and got a "you attempted to open a database
> >> > that
> >> > is already opened exclusively by user admin in machine.... (runtime
> >> > error
> >> > 3356). I rebooted machine. Nothing else is using it, and as i said
> >> > it
> >> > was
> >> > running fine in the past. How in the world can i get it to work, i
> >> > even
> >> > added code to close it, buut still...
> >> >
> >> > yes there is a .ldb open on the db..but it worked b4!
> >> >
> >> > here's what i have:
> >> > 'i just added this..but it doesn't help
> >> > Set dbWCData2003 = OpenDatabase("c:\bcs\worldchildren\wcdata2003.mdb")
> >> > With dbWCData2003
> >> > .Close
> >> > End With
> >> >
> >> > '''
> >> > DBEngine.CompactDatabase "c:\bcs\worldchildren\wcdata2003.mdb",
> >> > "c:\bcs\worldchildren\wcdata2003Compact.mdb"
> >> >
> >> > thank you for your time and help!!!!...in advance....
> >> >
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: odd jetcomp compact error on odd compact attempts Jeff Boyce Microsoft Access Database Table Design 0 20th Jan 2007 12:56 AM
Stopping Compact and Repair (and Compact on Close) - Records Disappear gee664@gmail.com Microsoft Access 7 25th Apr 2006 05:17 PM
Compact and Error -1601 Lloyd Microsoft Access Database Table Design 1 27th Aug 2004 06:52 PM
error after using compact/repair noi_max Microsoft Access 2 25th Mar 2004 05:53 PM
Compact Error paul Microsoft Access 1 11th Mar 2004 09:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:03 PM.