Disconnect all clients then Backup.

Dwayno

New member
Local time
Today, 00:46
Joined
May 25, 2000
Messages
8
I have a Access97 database on my NT Server and clients on several connected work stations (x95,x98) that link to the database. Each night at 0300 I want to disconnect or shutdown each client and then do a backup. Is this possible? I am somewhat familiar with access VB but very little with the Windows AP. Thanks
 
Contact a MCSE- or Windows-site for questions concerning network-administration. Via Access you can't close other Access-sessions.
 
Wrong

If you are coding your own database you can code in a kind of "Kick" function.


If you make a table (call it KICK) with 1 field, you can update the first (and only) record in this table to TRUE or FALSE.

Depending on what your database does you can write a bit of code into a module that checks for the value of this field.

If the value is true, the front end can shut itself down.

Be carefull though, make sure that you don't shut down anyones access window while they are in the middle of editing somthing.


A very very simple example could be

make a table called tblkick with these two fields

pk_Kick Autonumber
Kick Yes/No



public sub CheckforKick()
dim s as boolean
s = dlookup("[Field_Kick]","tblKick","pk_tblKICK = 1"
if s = true then
application.quit acsaveYes
end if


(You dont have to have to use autonumber, in fact i wouldnt.

Make a table like this say

tblControl


with two fields

CONTROL
PARAMATERS

you can then have a load of controls in one table.
 
What a good idea!, I sometimes need people to close their front end also, and of course they all do - apart from the ones that are on lunch/gone home etc. What I did (which you also may find a use for ) is downloaded appuser which gives a lits of people logged in, and then modified it a bit to NET SEND a message telling them to log out.
Not 100% sure on NT, but 2000 server you can remoetly shutdown/reboot a client.

Edit:

Looks like my memory is totally failing me! You can shutdown an NT or 2000 client from an NT or 2k server using shutdown.exe which is in the 2k reskit, unfortunately I dont think it would work on 9x clients, tho I can check on Monday when Im back at work if you like.

CALV
 
Last edited:
CALV,

Could you downsave the appuser download into the Access 97 version and post it here. Thanks!
 
No problem, glad to be finally giving something back instead of just asking questions all the time :)

CALV

oops
 
Last edited:
CALV, could you try and covert the db sample to Access 97 and repost it again? I am getting this error message when I try to open the form.

Thanks for your help!
 

Attachments

  • errormsg.jpg
    errormsg.jpg
    95.4 KB · Views: 153
Odd,

I downloaded the above zip, and got the message about not being able to make changes as it was created in a prior version, anyway I converted it again and here it is, hope it works!.

CALV
 

Attachments

Same error message. Access 97 is able to open the db but I can not open the form. :(
 
hmm, I dunno, I can post the code if you like and screenshots etc, the form itself is straight forward, but the code Is heavy stuff !!

CALV
 
CALV, place this sub in a module and run it. It will create a text of the frmLdbViewer form [all objects, properties, code, etc.]. Post the text file and I will see if I can load it into Access 97.

Private Sub bExportAsText_Click()
Application.SaveAsText acForm, "frmLdbViewer", "C:\frmLdbViewer.txt"
'This is how I am going to import your file into my Access 97 db.
Rem Application.LoadFromText acForm, "frmLdbViewer", "C:\frmLdbViewer.txt"
End Sub

Thanks again for your continued help! :D

Tip of the day...The SaveAsText & LoadFromText application options are undocumented Access commands that will work for acQuery, acReport, acModule and acForm.
 
CALV, I still can not import the form but I think I found the error. The Application.LoadFromText acForm command produced this error...

Error encountered at line 11.
Expected: 'End'. Found: AllowDesignChanges.

If you are still up for this, can you try another approach?

Open the form's module...

Copy and paste the code into a text file.

Then delete all of the code within that module. Save the form in an Access 97 version.

Zip the text file and the new form (minus the code) and post that.

Thanks again for your help and also for trying again! :D
 
Ok, lets try this! We'll get there one way or another! I tried opening it in access97 and got the same probs.The attatched file has a txt file and a codeless form, hope it works!

CALV
 

Attachments

CALV,

Thanks for your persistant help. That sample is not convertable to Access 97. It keeps crashing Access 97 every time I do anything with the form [open, export, import, etc].

I was able to decompile the db so that I got a temp copy of form and then I copied the code you posted. There are a few errors that Access 97 can not handle.

It does not like the Private Enum auLDBErrors declarations

It does not like the Split function since that was not invented until Access 2000.

Thanks for trying!!!
 

Users who are viewing this thread

Back
Top Bottom