Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / May 2007

Tip: Looking for answers? Try searching our database.

Display Short Name of Current Database name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kon - 27 May 2007 15:29 GMT
I use shell to backup my database where I put the xcopy /N /Y,
/N for handling the big names and /Y not to prompt for overwrite.

Shell(command /c xcopy /n / y c:\myfile d:\)

Myfile I get it from the Database using
currentproject.name
How can I use the shortname of currentProject.Name
in case my Database name is bigger than 8 characters ?

The same I need to Know for Directory Short Name since I prompt the user
where he wants to backup the file.

Thanks in Advace

Kon
Marshall Barton - 27 May 2007 18:15 GMT
>I use shell to backup my database where I put the xcopy /N /Y,
>/N for handling the big names and /Y not to prompt for overwrite.
[quoted text clipped - 8 lines]
>The same I need to Know for Directory Short Name since I prompt the user
>where he wants to backup the file.

Take a look at: http://www.mvps.org/access/api/api0020.htm

But, can't you use:

    Shell(command /c xcopy /n / y "c:\myfile" d:\)

so you don't care about long names?

BUT, copying an open database is a very risky thing to do
because you have no way to guarantee that the database is in
a consistent state, especially in a multi-user scenario.
Your plan also suffers from it's inability to verify that
the copy is actually usable.

Signature

Marsh
MVP [MS Access]

kon - 27 May 2007 23:04 GMT
I thank you for the Link code.

As about the backup of a mdb file can you please
suggest me any ways to do is safely. My mdb wont be a multi user database
but I would like to know if it was what you would have suggested me.

I thought that a TrasferDatabase (Where I can Export my tables to a specific
mdb is a good way right).

Thank you for the advice and the code again.

>>I use shell to backup my database where I put the xcopy /N /Y,
>>/N for handling the big names and /Y not to prompt for overwrite.
[quoted text clipped - 22 lines]
> Your plan also suffers from it's inability to verify that
> the copy is actually usable.
Marshall Barton - 28 May 2007 15:05 GMT
Backing up a file is too important to include with the
application you want to back up.  It should be an
independent operation that enforces exclusive access to the
file and includes a verification step so you can be sure
that the data is actually usable.

This means that you need to use a separate program (possibly
in another mdb database).
Signature

Marsh
MVP [MS Access]

>I thank you for the Link code.
>
[quoted text clipped - 31 lines]
>> Your plan also suffers from it's inability to verify that
>> the copy is actually usable.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.