Hi All,
I know this might be a silly question to ask but i was just wondering,
is there a way to save a specific MDB file , which is accessed from the server,
in to the local machine in a specific folder.
It will be good if there is a way so that the user can create a backup of the database they use into the local machine before they close.
is there any way or any other similar operation that could do this task???!!!!
thanks and regards,
catherine
9 2452
Hi All,
I know this might be a silly question to ask but i was just wondering,
is there a way to save a specific MDB file , which is accessed from the server,
in to the local machine in a specific folder.
It will be good if there is a way so that the user can create a backup of the database they use into the local machine before they close.
is there any way or any other similar operation that could do this task???!!!!
thanks and regards,
catherine
Hi Catherine,
There are always ways....but as in all things, there's a why involved here. Chances are if your database is on a server, it's already being backed up. As developers, we put our databases in central locations so the users don't end up creating their own that we'd eventually have to merge back into the original. I think my peers here back me up when I say it's a bad idea. If your user has a requirement to have a backup, then perhaps it's a more pointed request than backing up the whole database. Check with the administrators of the server to see if backups are being done already.
If you still feel you should complete this request, then you must make sure that the user has permissions to get to the database location, and it's a simple copy after that. It's a very bad idea to copy an open database, so this action should take place outside of the database that you want to copy. That also means that no one else should be in it either.
Maybe you should consider a batch file that you can run that copies the database. This type of file can be programmed into a scheduler and run at regular intervals.
There's a lot to your request...so if you require specific help on any of this, please let us know.
J
Hi Catherine,
There are always ways....but as in all things, there's a why involved here. Chances are if your database is on a server, it's already being backed up. As developers, we put our databases in central locations so the users don't end up creating their own that we'd eventually have to merge back into the original. I think my peers here back me up when I say it's a bad idea. If your user has a requirement to have a backup, then perhaps it's a more pointed request than backing up the whole database. Check with the administrators of the server to see if backups are being done already.
If you still feel you should complete this request, then you must make sure that the user has permissions to get to the database location, and it's a simple copy after that. It's a very bad idea to copy an open database, so this action should take place outside of the database that you want to copy. That also means that no one else should be in it either.
Maybe you should consider a batch file that you can run that copies the database. This type of file can be programmed into a scheduler and run at regular intervals.
There's a lot to your request...so if you require specific help on any of this, please let us know.
J
Hi J,
Thanks for your reply. I spoke to my Admin and i came to know they have not set up the server to have backups but he will do it some time soon. (strange..i dunno when!!)
but as of now what i am doing is, before leaving the office every night, i am keeping a copy of the db in my local machine.
I hope if the server is scheduled for backups, then i dont have to do this. I am just curious to know is there anyway to do this operation by any means, if the user has full access permission over the db??!!
regards,
Catherine
Hi J,
Thanks for your reply. I spoke to my Admin and i came to know they have not set up the server to have backups but he will do it some time soon. (strange..i dunno when!!)
but as of now what i am doing is, before leaving the office every night, i am keeping a copy of the db in my local machine.
I hope if the server is scheduled for backups, then i dont have to do this. I am just curious to know is there anyway to do this operation by any means, if the user has full access permission over the db??!!
regards,
Catherine
Is the old click and drag option not available to you? Are you looking for some kind of script or copy command thinking that you can push a button and be done?
Like I said, if you're in the database that you want to backup, then you'll end up with corruption.
J
May be ontherun should use scheduling software to save the mdb file in the respective folder.
May be ontherun should use scheduling software to save the mdb file in the respective folder.
-
If you feel you're all right with saving when you close still, create a small function
-
-
Put it into a CODE module.
-
-
Function SaveBackEnd()
-
Dim strSavePath, strSaveFile, strNowPath as string
-
strSavePath = "C:\Database\" ' the directory where you want to save your back end
-
strNowPath = "C;\Wherever\MyBackend.mdb" ' the directory where your back end is now
-
strSaveFile = "MyBackend_" & format(date(),"mmddyyyy") & ".mdb"
-
filecopy strNowPath, strSavePath & strSaveFile
-
end function
-
-
Now in your on_close event of your switchboard, call the function
-
-
SaveBackEnd
-
-
-
If you feel you're all right with saving when you close still, create a small function
-
-
Put it into a CODE module.
-
-
Function SaveBackEnd()
-
Dim strSavePath, strSaveFile, strNowPath as string
-
strSavePath = "C:\Database\" ' the directory where you want to save your back end
-
strNowPath = "C;\Wherever\MyBackend.mdb" ' the directory where your back end is now
-
strSaveFile = "MyBackend_" & format(date(),"mmddyyyy") & ".mdb"
-
filecopy strNowPath, strSavePath & strSaveFile
-
end function
-
-
Now in your on_close event of your switchboard, call the function
-
-
SaveBackEnd
-
-
I must try this out as well.
I must try this out as well.
Hi ,
i saved the as in the module and called from on_Close event..
but it doesnt do anything i mean, there is no mdb file saved in the directory i specified nor a error message.
the code was,
Privare Sub Form_Close()
SaveBackEnd - module
End Sub
MODULE:
Function SaveBackEnd()
Dim strSavePath, strSaveFile, strNowPath As String
strSavePath = "C:\TestingDB\"
strNowPath = "C:\Documents and Settings\Admin\Desktop\PriceList.mdb"
strSaveFile = "MyBackend_" & Format(Date, "mmddyyyy") & ".mdb"
FileCopy strNowPath, strSavePath & strSaveFile
End Function
Instead, i used this code on button click: but i got a error message saying, Expected Variable or procedure not a module.
need your assistance
regards,
catherine
Hi ,
i saved the as in the module and called from on_Close event..
but it doesnt do anything i mean, there is no mdb file saved in the directory i specified nor a error message.
the code was,
Privare Sub Form_Close()
SaveBackEnd - module
End Sub
MODULE:
Function SaveBackEnd()
Dim strSavePath, strSaveFile, strNowPath As String
strSavePath = "C:\TestingDB\"
strNowPath = "C:\Documents and Settings\Admin\Desktop\PriceList.mdb"
strSaveFile = "MyBackend_" & Format(Date, "mmddyyyy") & ".mdb"
FileCopy strNowPath, strSavePath & strSaveFile
End Function
Instead, i used this code on button click: but i got a error message saying, Expected Variable or procedure not a module.
need your assistance
regards,
catherine
is this verbatim? -
Privare Sub Form_Close()
-
-
SaveBackEnd - module
-
-
End Sub
-
take out the - module
so its just SaveBackEnd
you inserted the code into a new module right? You didn't save the module SaveBackEnd by chance did you? if you did, you can't name a module and function the same..rename your module to mod_SaveBackEnd
J
is this verbatim? -
Privare Sub Form_Close()
-
-
SaveBackEnd - module
-
-
End Sub
-
take out the - module
so its just SaveBackEnd
you inserted the code into a new module right? You didn't save the module SaveBackEnd by chance did you? if you did, you can't name a module and function the same..rename your module to mod_SaveBackEnd
J
I didnt include the word module in the code. however i saved the module as mod_SaveBackEnd and called the function under Form_Close() function.
but when i tried to close , it says permission denied.
then i tried 2 call the function under Quit Button Click.
but nothing happens and the my file was not saved in the folder i specified.
is there any other step am missing here???
need your assistance.
regards,
Catherine
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Andras Gilicz |
last post by:
Hi VB fans
I'm working on a relatively large project in VB6 with about a dozen
forms, including graphs, labels, text boxes, etc. The software itself
is actually a flow simulator with more or...
|
by: deko |
last post by:
I'm trying to set up a "preferences form" where users can choose from a few
different pre-defined colors. The color numbers and form names are saved in
tblColors. The below code changes the form...
|
by: icedgar |
last post by:
am using the following script in the BeforeUpdate area of a main form.
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String
strMsg = "Do you wish to save your changes?"
If...
|
by: deko |
last post by:
I create an XmlDataDocument Dataset when the main form of my WinForms app
opens. The user will make changes to the Dataset, and then those changes
should be saved to the XML file when the code...
|
by: DSchlichte |
last post by:
Hello
' I need some help. I've created a little application to paint, save and
load pictures (Bitmap-graphics) into
' a picturebox-object on the desktop. There's no problem to paint or to load...
|
by: Marcos |
last post by:
Hi Everybody!!
Does anyone know how I can save all Access form (with a database) on
a CD, for example? I save the file, but there's only the empty form,
without other archives.
I'd like to know...
|
by: zulbaric |
last post by:
Hi, ive just finished building more "tabbed web browser with favourites menu" but i cant ge the favourites menu to work properly. THe add functions are ok the problem is I cant ge t the favourites to...
|
by: Lee |
last post by:
I have the following code
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Collections;
namespace FINN
{
|
by: Josetta |
last post by:
Access 2003
I've been experiencing some problems with my "monster" database the
last couple of days. I imported all objects into a new database
yesterday, which pretty much stopped the crashing...
|
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= |
last post by:
Hi, thanks, mister
The code
string rutaConfig = tbRutaConfigServicioBase.Text;
'// Map to the application configuration file.
ExeConfigurationFileMap configFile = New...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |