Renaming a database after compact | | |
(Using A2003 on XP)
I have tied in a 'CompactDatabase' (DAO) method for the Backend on the Exit
of the front end (split db). In that call I have to provide an olddb and a
newdb name. All is good so far.
After I have compacted the backend, I would like to rename the newly
compacted backend to that of the existing backend name, obviously replacing
it.
Whether I delete the original uncompated backend and then rename the new
one, I really don't care how I go about it. But how do I go about it
programmatically??
The users of this system are novices and I would not like to have to leave
instructions to do this manually from Windows Explorer.
Many thanks
Michelle | | | | re: Renaming a database after compact
Use the FileCopy and Kill commands.
"-Michelle-" <milkyswirl@yahoo.com> wrote in message
news:bv2759$1ua8$1@otis.netspace.net.au...[color=blue]
> (Using A2003 on XP)
>
> I have tied in a 'CompactDatabase' (DAO) method for the Backend on the[/color]
Exit[color=blue]
> of the front end (split db). In that call I have to provide an olddb and[/color]
a[color=blue]
> newdb name. All is good so far.
>
> After I have compacted the backend, I would like to rename the newly
> compacted backend to that of the existing backend name, obviously[/color]
replacing[color=blue]
> it.
>
> Whether I delete the original uncompated backend and then rename the new
> one, I really don't care how I go about it. But how do I go about it
> programmatically??
>
> The users of this system are novices and I would not like to have to leave
> instructions to do this manually from Windows Explorer.
>
> Many thanks
> Michelle
>
>
>
>
>
>[/color] | | | | re: Renaming a database after compact
On Mon, 26 Jan 2004 15:04:43 +1000, -Michelle- wrote:
[color=blue]
> (Using A2003 on XP)
>
> I have tied in a 'CompactDatabase' (DAO) method for the Backend on the Exit
> of the front end (split db). In that call I have to provide an olddb and a
> newdb name. All is good so far.
>
> After I have compacted the backend, I would like to rename the newly
> compacted backend to that of the existing backend name, obviously replacing
> it.
>
> Whether I delete the original uncompated backend and then rename the new
> one, I really don't care how I go about it. But how do I go about it
> programmatically??
>
> The users of this system are novices and I would not like to have to leave
> instructions to do this manually from Windows Explorer.
>
> Many thanks
> Michelle[/color]
Is the Name oldpathname As newpathname statement still available in
2003? If so, try that.
--
Mike Storr
veraccess.com | | | | re: Renaming a database after compact
Thanks Mike. Worked a treat!!
"Mike Storr" <storrboy@sympatico.ca> wrote in message
news:11xany77vk254.12lkx13tba8mc$.dlg@40tude.net.. .[color=blue]
> On Mon, 26 Jan 2004 15:04:43 +1000, -Michelle- wrote:
>[color=green]
> > (Using A2003 on XP)
> >
> > I have tied in a 'CompactDatabase' (DAO) method for the Backend on the[/color][/color]
Exit[color=blue][color=green]
> > of the front end (split db). In that call I have to provide an olddb[/color][/color]
and a[color=blue][color=green]
> > newdb name. All is good so far.
> >
> > After I have compacted the backend, I would like to rename the newly
> > compacted backend to that of the existing backend name, obviously[/color][/color]
replacing[color=blue][color=green]
> > it.
> >
> > Whether I delete the original uncompated backend and then rename the new
> > one, I really don't care how I go about it. But how do I go about it
> > programmatically??
> >
> > The users of this system are novices and I would not like to have to[/color][/color]
leave[color=blue][color=green]
> > instructions to do this manually from Windows Explorer.
> >
> > Many thanks
> > Michelle[/color]
>
> Is the Name oldpathname As newpathname statement still available in
> 2003? If so, try that.
> --
> Mike Storr
> veraccess.com[/color] | | | | re: Renaming a database after compact
On Mon, 26 Jan 2004 17:03:32 +1000, -Michelle- wrote:
Cool. DFS's suggestion of the FileCopy/Kill commands may work better if you
are trying to do this between different drives, as I believe Name has this
restriction.
--
Mike Storr
veraccess.com
[color=blue]
> Thanks Mike. Worked a treat!!
>
>
> "Mike Storr" <storrboy@sympatico.ca> wrote in message
> news:11xany77vk254.12lkx13tba8mc$.dlg@40tude.net.. .[color=green]
>> On Mon, 26 Jan 2004 15:04:43 +1000, -Michelle- wrote:
>>[color=darkred]
>>> (Using A2003 on XP)
>>>
>>> I have tied in a 'CompactDatabase' (DAO) method for the Backend on the[/color][/color]
> Exit[color=green][color=darkred]
>>> of the front end (split db). In that call I have to provide an olddb[/color][/color]
> and a[color=green][color=darkred]
>>> newdb name. All is good so far.
>>>
>>> After I have compacted the backend, I would like to rename the newly
>>> compacted backend to that of the existing backend name, obviously[/color][/color]
> replacing[color=green][color=darkred]
>>> it.
>>>
>>> Whether I delete the original uncompated backend and then rename the[/color][/color][/color]
new[color=blue][color=green][color=darkred]
>>> one, I really don't care how I go about it. But how do I go about it
>>> programmatically??
>>>
>>> The users of this system are novices and I would not like to have to[/color][/color]
> leave[color=green][color=darkred]
>>> instructions to do this manually from Windows Explorer.
>>>
>>> Many thanks
>>> Michelle[/color]
>>
>> Is the Name oldpathname As newpathname statement still available in
>> 2003? If so, try that.
>> --
>> Mike Storr
>> veraccess.com[/color][/color] | | | | re: Renaming a database after compact
Thanks DFS for your reply. Much appreciated.
"DFS" <nospam@nospam.com> wrote in message
news:10198at4cjqtl3e@corp.supernews.com...[color=blue]
> Use the FileCopy and Kill commands.
>
> "-Michelle-" <milkyswirl@yahoo.com> wrote in message
> news:bv2759$1ua8$1@otis.netspace.net.au...[color=green]
> > (Using A2003 on XP)
> >
> > I have tied in a 'CompactDatabase' (DAO) method for the Backend on the[/color]
> Exit[color=green]
> > of the front end (split db). In that call I have to provide an olddb[/color][/color]
and[color=blue]
> a[color=green]
> > newdb name. All is good so far.
> >
> > After I have compacted the backend, I would like to rename the newly
> > compacted backend to that of the existing backend name, obviously[/color]
> replacing[color=green]
> > it.
> >
> > Whether I delete the original uncompated backend and then rename the new
> > one, I really don't care how I go about it. But how do I go about it
> > programmatically??
> >
> > The users of this system are novices and I would not like to have to[/color][/color]
leave[color=blue][color=green]
> > instructions to do this manually from Windows Explorer.
> >
> > Many thanks
> > Michelle
> >
> >
> >
> >
> >
> >[/color]
>
>[/color] | | | | re: Renaming a database after compact
On Mon, 26 Jan 2004 09:47:16 -0500, Mike Storr <storrboy@sympatico.ca>
wrote:[color=blue]
>
>Cool. DFS's suggestion of the FileCopy/Kill commands may work better if you
>are trying to do this between different drives, as I believe Name has this
>restriction.
>[/color]
That restriction is implied or maybe even stated in the help file, but
it works fine between drives - even removable drives (Zip).
I have used in different scenarios: Across a LAN for an automated
nightly backup and to a Zip drive for on-demand backup.
What I generally do is:
'Move file to destination
Name strSource As strDestination
'Compact it back to the original source
DBEngine.CompactDatabase strDestination, strSource
- Jim | | | | re: Renaming a database after compact
On Mon, 26 Jan 2004 22:43:38 GMT, Jim Allensworth wrote:
[color=blue]
> On Mon, 26 Jan 2004 09:47:16 -0500, Mike Storr <storrboy@sympatico.ca>
> wrote:[color=green]
>>
>>Cool. DFS's suggestion of the FileCopy/Kill commands may work better if you
>>are trying to do this between different drives, as I believe Name has this
>>restriction.
>>[/color]
> That restriction is implied or maybe even stated in the help file, but
> it works fine between drives - even removable drives (Zip).
>
> I have used in different scenarios: Across a LAN for an automated
> nightly backup and to a Zip drive for on-demand backup.
>
> What I generally do is:
>
> 'Move file to destination
> Name strSource As strDestination
>
> 'Compact it back to the original source
> DBEngine.CompactDatabase strDestination, strSource
>
>
> - Jim[/color]
Good to know! I wonder if there is just something about it where they can't
guarantee that it will work and as such won't claim that it does?
I never used it across different drives myself.
--
Mike Storr
veraccess.com | | | | re: Renaming a database after compact
On Mon, 26 Jan 2004 21:38:28 -0500, Mike Storr <storrboy@sympatico.ca>
wrote:
[color=blue]
>On Mon, 26 Jan 2004 22:43:38 GMT, Jim Allensworth wrote:
>[color=green]
>> On Mon, 26 Jan 2004 09:47:16 -0500, Mike Storr <storrboy@sympatico.ca>
>> wrote:[color=darkred]
>>>
>>>Cool. DFS's suggestion of the FileCopy/Kill commands may work better if you
>>>are trying to do this between different drives, as I believe Name has this
>>>restriction.
>>>[/color]
>> That restriction is implied or maybe even stated in the help file, but
>> it works fine between drives - even removable drives (Zip).
>>
>> I have used in different scenarios: Across a LAN for an automated
>> nightly backup and to a Zip drive for on-demand backup.
>>
>> What I generally do is:
>>
>> 'Move file to destination
>> Name strSource As strDestination
>>
>> 'Compact it back to the original source
>> DBEngine.CompactDatabase strDestination, strSource
>>
>>
>> - Jim[/color]
>
>Good to know! I wonder if there is just something about it where they can't
>guarantee that it will work and as such won't claim that it does?
>I never used it across different drives myself.
>--
>Mike Storr
>veraccess.com[/color]
I don't know why it isn't acknowledged in help. I do know that others
use it in the same way as I - that's where I got the idea. Also, I
have never had a problem with it. In the LAN backup situation it has
run nightly for > 4 years flawlessly.
- Jim | | | | re: Renaming a database after compact
I think MS must write their help files in the wee morning hours when they're
only half awake.
Seeing as how there are so many omissions, misprints and lack of examples in
they're earlier versions, and how the newer versions just simply don't tell
you anything, I think these groups will become more and more the mainstay of
information on Access.
"Jim Allensworth" <jimNOT@Notdatacentricsolutions.com> wrote in message
news:4016a0f9.319893000@news.west.earthlink.net...[color=blue]
> On Mon, 26 Jan 2004 21:38:28 -0500, Mike Storr <storrboy@sympatico.ca>
> wrote:
>[color=green]
> >On Mon, 26 Jan 2004 22:43:38 GMT, Jim Allensworth wrote:
> >[color=darkred]
> >> On Mon, 26 Jan 2004 09:47:16 -0500, Mike Storr <storrboy@sympatico.ca>
> >> wrote:
> >>>
> >>>Cool. DFS's suggestion of the FileCopy/Kill commands may work better if[/color][/color][/color]
you[color=blue][color=green][color=darkred]
> >>>are trying to do this between different drives, as I believe Name has[/color][/color][/color]
this[color=blue][color=green][color=darkred]
> >>>restriction.
> >>>
> >> That restriction is implied or maybe even stated in the help file, but
> >> it works fine between drives - even removable drives (Zip).
> >>
> >> I have used in different scenarios: Across a LAN for an automated
> >> nightly backup and to a Zip drive for on-demand backup.
> >>
> >> What I generally do is:
> >>
> >> 'Move file to destination
> >> Name strSource As strDestination
> >>
> >> 'Compact it back to the original source
> >> DBEngine.CompactDatabase strDestination, strSource
> >>
> >>
> >> - Jim[/color]
> >
> >Good to know! I wonder if there is just something about it where they[/color][/color]
can't[color=blue][color=green]
> >guarantee that it will work and as such won't claim that it does?
> >I never used it across different drives myself.
> >--
> >Mike Storr
> >veraccess.com[/color]
> I don't know why it isn't acknowledged in help. I do know that others
> use it in the same way as I - that's where I got the idea. Also, I
> have never had a problem with it. In the LAN backup situation it has
> run nightly for > 4 years flawlessly.
>
> - Jim[/color] |  | Similar Microsoft Access / VBA bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,510 network members.
|