PC Review


Reply
Thread Tools Rate Thread

Back up backend file

 
 
=?Utf-8?B?T3JlZ29uSXplcg==?=
Guest
Posts: n/a
 
      24th Jun 2005
I "borrowed" a subroutine that I found in this group to create a backup of my
backend. (Thanks Ken Snell). Before it runs a backup it checks for a locking
file to make sure that no one else is in the system. This works fine if I
manually close any open forms before I try to run the subroutine. But if I
close forms in vba as part of my function it leaves the locking file and
'believes' someone else is in the system. Can someone tell me how to get rid
of the .ldb file.
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      25th Jun 2005
How are you closing the forms? It shouldn't matter whether you're closing
them programmatically or manually.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"OregonIzer" <(E-Mail Removed)> wrote in message
news:0B47789F-69BE-45ED-89B4-(E-Mail Removed)...
>I "borrowed" a subroutine that I found in this group to create a backup of
>my
> backend. (Thanks Ken Snell). Before it runs a backup it checks for a
> locking
> file to make sure that no one else is in the system. This works fine if I
> manually close any open forms before I try to run the subroutine. But if I
> close forms in vba as part of my function it leaves the locking file and
> 'believes' someone else is in the system. Can someone tell me how to get
> rid
> of the .ldb file.



 
Reply With Quote
 
Pringle9984
Guest
Posts: n/a
 
      25th Jun 2005
I expect there's probably a better way but I've never needed to ge
rid of the ldb file in VBA before - if no one else suggests anythin
you could use the 'kill' method to delete it

 
Reply With Quote
 
=?Utf-8?B?T3JlZ29uSXplcg==?=
Guest
Posts: n/a
 
      27th Jun 2005
I initially was just closing the form I expected to be active. I then
realized I should make sure all are closed, so I created:

Public Function ClsForms()
Dim i As Integer
For i = Forms.Count - 1 To 0 Step -1
DoCmd.Close acForm, Forms(i).Name
Next
Connection.Close
End Function

If I watch the directory that the ldb file is in as I manually close forms,
I see it disappear. When I use code to close, it's still there.


"Douglas J. Steele" wrote:

> How are you closing the forms? It shouldn't matter whether you're closing
> them programmatically or manually.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "OregonIzer" <(E-Mail Removed)> wrote in message
> news:0B47789F-69BE-45ED-89B4-(E-Mail Removed)...
> >I "borrowed" a subroutine that I found in this group to create a backup of
> >my
> > backend. (Thanks Ken Snell). Before it runs a backup it checks for a
> > locking
> > file to make sure that no one else is in the system. This works fine if I
> > manually close any open forms before I try to run the subroutine. But if I
> > close forms in vba as part of my function it leaves the locking file and
> > 'believes' someone else is in the system. Can someone tell me how to get
> > rid
> > of the .ldb file.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?T3JlZ29uSXplcg==?=
Guest
Posts: n/a
 
      27th Jun 2005
Oops,
I just noticed that the code I sent isn't what I'm using.
that line
"connection.close"
Is just something I stuck in to show what I think is missing - I forgot to
delete it before I sent the code - also, I was having the exact same result
when I was just closing the one form.

"Douglas J. Steele" wrote:

> How are you closing the forms? It shouldn't matter whether you're closing
> them programmatically or manually.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "OregonIzer" <(E-Mail Removed)> wrote in message
> news:0B47789F-69BE-45ED-89B4-(E-Mail Removed)...
> >I "borrowed" a subroutine that I found in this group to create a backup of
> >my
> > backend. (Thanks Ken Snell). Before it runs a backup it checks for a
> > locking
> > file to make sure that no one else is in the system. This works fine if I
> > manually close any open forms before I try to run the subroutine. But if I
> > close forms in vba as part of my function it leaves the locking file and
> > 'believes' someone else is in the system. Can someone tell me how to get
> > rid
> > of the .ldb file.

>
>
>

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      28th Jun 2005
That should work: that's essentially what I use successfully in my
applications.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"OregonIzer" <(E-Mail Removed)> wrote in message
news:937A7F99-D4F6-442D-9F4B-(E-Mail Removed)...
>I initially was just closing the form I expected to be active. I then
> realized I should make sure all are closed, so I created:
>
> Public Function ClsForms()
> Dim i As Integer
> For i = Forms.Count - 1 To 0 Step -1
> DoCmd.Close acForm, Forms(i).Name
> Next
> Connection.Close
> End Function
>
> If I watch the directory that the ldb file is in as I manually close
> forms,
> I see it disappear. When I use code to close, it's still there.
>
>
> "Douglas J. Steele" wrote:
>
>> How are you closing the forms? It shouldn't matter whether you're closing
>> them programmatically or manually.
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>>
>> "OregonIzer" <(E-Mail Removed)> wrote in message
>> news:0B47789F-69BE-45ED-89B4-(E-Mail Removed)...
>> >I "borrowed" a subroutine that I found in this group to create a backup
>> >of
>> >my
>> > backend. (Thanks Ken Snell). Before it runs a backup it checks for a
>> > locking
>> > file to make sure that no one else is in the system. This works fine if
>> > I
>> > manually close any open forms before I try to run the subroutine. But
>> > if I
>> > close forms in vba as part of my function it leaves the locking file
>> > and
>> > 'believes' someone else is in the system. Can someone tell me how to
>> > get
>> > rid
>> > of the .ldb file.

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?T3JlZ29uSXplcg==?=
Guest
Posts: n/a
 
      28th Jun 2005
Is there some action I should take to "close the connections"? If so, how
would I do that? (If it isn't clear, I am NOT a programmer)

"Douglas J. Steele" wrote:

> That should work: that's essentially what I use successfully in my
> applications.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "OregonIzer" <(E-Mail Removed)> wrote in message
> news:937A7F99-D4F6-442D-9F4B-(E-Mail Removed)...
> >I initially was just closing the form I expected to be active. I then
> > realized I should make sure all are closed, so I created:
> >
> > Public Function ClsForms()
> > Dim i As Integer
> > For i = Forms.Count - 1 To 0 Step -1
> > DoCmd.Close acForm, Forms(i).Name
> > Next
> > Connection.Close
> > End Function
> >
> > If I watch the directory that the ldb file is in as I manually close
> > forms,
> > I see it disappear. When I use code to close, it's still there.
> >
> >
> > "Douglas J. Steele" wrote:
> >
> >> How are you closing the forms? It shouldn't matter whether you're closing
> >> them programmatically or manually.
> >>
> >> --
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >>
> >> "OregonIzer" <(E-Mail Removed)> wrote in message
> >> news:0B47789F-69BE-45ED-89B4-(E-Mail Removed)...
> >> >I "borrowed" a subroutine that I found in this group to create a backup
> >> >of
> >> >my
> >> > backend. (Thanks Ken Snell). Before it runs a backup it checks for a
> >> > locking
> >> > file to make sure that no one else is in the system. This works fine if
> >> > I
> >> > manually close any open forms before I try to run the subroutine. But
> >> > if I
> >> > close forms in vba as part of my function it leaves the locking file
> >> > and
> >> > 'believes' someone else is in the system. Can someone tell me how to
> >> > get
> >> > rid
> >> > of the .ldb file.
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
=?Utf-8?B?T3JlZ29uSXplcg==?=
Guest
Posts: n/a
 
      28th Jun 2005
I tried putting in a "kill" but I get "Permission denied"

"Pringle9984" wrote:

> I expect there's probably a better way but I've never needed to get
> rid of the ldb file in VBA before - if no one else suggests anything
> you could use the 'kill' method to delete it.
>
>

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      28th Jun 2005
You shouldn't require anything more than you have.

You don't have a report or query open when you're doing this by any chance?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"OregonIzer" <(E-Mail Removed)> wrote in message
news:8BEF6C26-9C82-4FD9-8B22-(E-Mail Removed)...
> Is there some action I should take to "close the connections"? If so, how
> would I do that? (If it isn't clear, I am NOT a programmer)
>
> "Douglas J. Steele" wrote:
>
>> That should work: that's essentially what I use successfully in my
>> applications.
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>>
>> "OregonIzer" <(E-Mail Removed)> wrote in message
>> news:937A7F99-D4F6-442D-9F4B-(E-Mail Removed)...
>> >I initially was just closing the form I expected to be active. I then
>> > realized I should make sure all are closed, so I created:
>> >
>> > Public Function ClsForms()
>> > Dim i As Integer
>> > For i = Forms.Count - 1 To 0 Step -1
>> > DoCmd.Close acForm, Forms(i).Name
>> > Next
>> > Connection.Close
>> > End Function
>> >
>> > If I watch the directory that the ldb file is in as I manually close
>> > forms,
>> > I see it disappear. When I use code to close, it's still there.
>> >
>> >
>> > "Douglas J. Steele" wrote:
>> >
>> >> How are you closing the forms? It shouldn't matter whether you're
>> >> closing
>> >> them programmatically or manually.
>> >>
>> >> --
>> >> Doug Steele, Microsoft Access MVP
>> >> http://I.Am/DougSteele
>> >> (no e-mails, please!)
>> >>
>> >>
>> >>
>> >> "OregonIzer" <(E-Mail Removed)> wrote in message
>> >> news:0B47789F-69BE-45ED-89B4-(E-Mail Removed)...
>> >> >I "borrowed" a subroutine that I found in this group to create a
>> >> >backup
>> >> >of
>> >> >my
>> >> > backend. (Thanks Ken Snell). Before it runs a backup it checks for a
>> >> > locking
>> >> > file to make sure that no one else is in the system. This works fine
>> >> > if
>> >> > I
>> >> > manually close any open forms before I try to run the subroutine.
>> >> > But
>> >> > if I
>> >> > close forms in vba as part of my function it leaves the locking file
>> >> > and
>> >> > 'believes' someone else is in the system. Can someone tell me how to
>> >> > get
>> >> > rid
>> >> > of the .ldb file.
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?T3JlZ29uSXplcg==?=
Guest
Posts: n/a
 
      29th Jun 2005
Nothing is open - the command runs from a button on a toolbar.

"Douglas J. Steele" wrote:

> You shouldn't require anything more than you have.
>
> You don't have a report or query open when you're doing this by any chance?
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "OregonIzer" <(E-Mail Removed)> wrote in message
> news:8BEF6C26-9C82-4FD9-8B22-(E-Mail Removed)...
> > Is there some action I should take to "close the connections"? If so, how
> > would I do that? (If it isn't clear, I am NOT a programmer)
> >
> > "Douglas J. Steele" wrote:
> >
> >> That should work: that's essentially what I use successfully in my
> >> applications.
> >>
> >> --
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >>
> >> "OregonIzer" <(E-Mail Removed)> wrote in message
> >> news:937A7F99-D4F6-442D-9F4B-(E-Mail Removed)...
> >> >I initially was just closing the form I expected to be active. I then
> >> > realized I should make sure all are closed, so I created:
> >> >
> >> > Public Function ClsForms()
> >> > Dim i As Integer
> >> > For i = Forms.Count - 1 To 0 Step -1
> >> > DoCmd.Close acForm, Forms(i).Name
> >> > Next
> >> > Connection.Close
> >> > End Function
> >> >
> >> > If I watch the directory that the ldb file is in as I manually close
> >> > forms,
> >> > I see it disappear. When I use code to close, it's still there.
> >> >
> >> >
> >> > "Douglas J. Steele" wrote:
> >> >
> >> >> How are you closing the forms? It shouldn't matter whether you're
> >> >> closing
> >> >> them programmatically or manually.
> >> >>
> >> >> --
> >> >> Doug Steele, Microsoft Access MVP
> >> >> http://I.Am/DougSteele
> >> >> (no e-mails, please!)
> >> >>
> >> >>
> >> >>
> >> >> "OregonIzer" <(E-Mail Removed)> wrote in message
> >> >> news:0B47789F-69BE-45ED-89B4-(E-Mail Removed)...
> >> >> >I "borrowed" a subroutine that I found in this group to create a
> >> >> >backup
> >> >> >of
> >> >> >my
> >> >> > backend. (Thanks Ken Snell). Before it runs a backup it checks for a
> >> >> > locking
> >> >> > file to make sure that no one else is in the system. This works fine
> >> >> > if
> >> >> > I
> >> >> > manually close any open forms before I try to run the subroutine.
> >> >> > But
> >> >> > if I
> >> >> > close forms in vba as part of my function it leaves the locking file
> >> >> > and
> >> >> > 'believes' someone else is in the system. Can someone tell me how to
> >> >> > get
> >> >> > rid
> >> >> > of the .ldb file.
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
>

 
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
Simple task works when MS SQL Server is the backend but not when MySQL is the backend. Ted Microsoft ASP .NET 1 22nd Feb 2007 08:33 PM
Back up a Split Database's Backend scs Microsoft Access Getting Started 6 24th Feb 2006 04:34 AM
Editing backend file Microsoft Access 4 30th Sep 2005 02:40 PM
Backend file Steve Microsoft Access Security 1 2nd Feb 2005 08:59 AM
Linking back and front end - Is there a way to specify the backend path with code? Leonard Priestley Microsoft Access Form Coding 1 1st Jan 2004 06:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:09 AM.