Configuring a client/server db

Good morning Rob:

My batch which works is as follows:

md "c:\my documents" CR
copy s:\everyone\ecndatabase\BereaECN.mdb "c:\my documents\*.*" CR
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "c:\my documents\BereaECN.mdb" CR
/WRKGRP "s:\everyone\ecndatabase\Secured.mdw"

Each command is broken onto a new line. I also noticed that you have quotes around the copy statement "from directory" while I only have them around the directory to copy to.

I'm grasping here but I also have the batch file located on the server and access it via a shortcut (as our email security won't let me send a batch file but will allow a shortcut). I mainly did it so I could change the batch file and wouldn't have to redistribute it.

Today is your day. We WILL get this working.

Autoeng
 
Hi Rob,

Yes, that's it. This would seperate the command into two commands, just like running them idividually when you tested them.

Pete
 
Alright, we're getting closer! I've setup the commands on separate lines like you said with CR at the end:

copy "J:\Tax\Outsourcing\Payment Calculator\Calculator\PymtCalc.mdb" "C:\Documents and Settings\All Users\Documents\*.*" CR
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\Documents and Settings\All Users\Documents\PymtCalc.mdb" CR
/wrkgrp "J:\Tax\Outsourcing\Payment Calculator\CONSECOWRKGRP.MDW"

I know you said you don't use quotes around the first path but that was the only way I could make it just copy. But now something different's happening. When I run it an MS DOS window opens with the first command then a line that says 'Can not find the specified file'. Then it displays the other commands. I went ahead and verified the path by copying and pasting out of the properties window. Weird thing is it works fine when I don't have the 2nd commands.

At the same time it does that in Dos it opens a window that says:

The command line you used to start Microsoft Access ocntains an option that Microsoft Access doesn't recognize/
Exit and restart Microsoft Access using valid command-line options.

When I hit ok on this window it tries to open the copied db but of course it's not there.

Man! I know we're almost there. Any idea why the having the 2nd commands included would mess everything up?
 
Try a carriage return after the command

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE"

Maybe this will let Access start AND THEN load the database.

another thought, could this be a mapping issue to the J drive when you are in dos?

Autoeng
 
Hmmm, a 'carriage return'? Sorry, but I'm as green as green can be when it comes to DOS.

I don't think it would be a mapping issue only because I've made separate batch files for the copy command and for the open command. Both work fine on their own. Problems occurs when I combine the two.
 
Don't type the CR! Just hit enter so that the next line is on the next line. CR = Enter.

Autoeng
 
Ok. Tried that and it first opened a DOS window then immediately opened Access but with the window that lets you select whether you want to create a new db or open an existing one. With a hunch I tried putting the copy command on 1 line ending with CR. Then I put the ALL of the open command on the next line. What happened was that it opened DOS and then opened Access trying to open up the copied db. So, I think that's along the right lines. But for some reason the db's just not getting copied. And that's really confusing especially since the copy command works fine if it's the only command in the file.
 
Here's one from the peanut gallery.

I think the command

<<
copy "J:\Tax\Outsourcing\Payment Calculator\Calculator\PymtCalc.mdb" "C:\Documents and Settings\All Users\Documents\*.*" CR
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\Documents and Settings\All Users\Documents\PymtCalc.mdb" CR
/wrkgrp "J:\Tax\Outsourcing\Payment Calculator\CONSECOWRKGRP.MDW"
>>

should not have a "CR" before /wrkgrp

RichM
 
No, I agree. Right now my code looks like this:

1st line:

copy "J:\Tax\Outsourcing\Payment Calculator\Calculator\PymtCalc.mdb" "C:\Documents and Settings\All Users\Documents\*.*" CR

2nd line:

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\Documents and Settings\All Users\Documents\PymtCalc.mdb" /wrkgrp "J:\Tax\Outsourcing\Payment Calculator\CONSECOWRKGRP.MDW"

With it this way it tries to open the db before it's copied.
 
Rob:

One recommedation for db speed is that the backend is as far up the directory structure as possible. Right now you have it 3 directories deep when 2 is the max suggested. I know that this doesn't have squat to do with the batch file issue but as I have no other suggestions this is all that I can chime in with.

I wonder if there isn't some sort of shareware program out there on the internet used to create batch files by point and click? Maybe, if there is, by using it you could get it to work.

Hell, I don't know. I'm all out of ideas. I'm sorry that this isn't working for you as it works great for me and has made db updating easy as pie.

Autoeng
 
Alright. The verdict is in. The network guys won't let me do this. Jerks!

Must be the problem. Sorry, we went through all this other stuff only to find out it was out of my control. Appreciate your help Autoeng.
 
Rob:

There are other ways to copy the FE to the users desktop. You can set a version in the FE that will look at the server copy and if they don't match will copy the server copy over to the user. I'll look around and send you the info when I find it.

What was it that was keeping the batch from working. Was it some security setting for your server?

Autoeng
 
That would be great! I appreciate your efforts.

I don't know exactly what's holding things back. I didn't ask the NT guys that directly. They're mad at me at the moment. Especially since now they've realized that I've setup other DBs and distributed that FE on my own. "That's our job!" they say.

It's bureacracy I tell you! Somebody's conspiring to conspire.
 
Thanks Autoeng! I've briefly looked through this article and it looks good. I'm going to go through it in detail this afternoon and figure out what I can do. Personally I think yours is the best being that it's the simplest. Wish it would work for me here. Luckily there's more than one way to skin a cat!
 
This is great!!!

Hello,
I have been updating all my computer, well all 4 of my office computers individualy!!! jejeje, I was getting sick of people asking for simple changes one at a time!!! I kept telling them to give me all the changes at one time, they dont seem to understand that!!jeje. So every day I had to change something and go to all the computer and download the FE again!!! Now the problem is that I HAVE NO IDEA ABOUT BATCH FILES!!!! Does the batch file automaticly runs when you save the file as .bat? Meaning if I try to create a batch file and save it in notepad as "mybatchname.bat" it will automaticly run or how do I do it? I have the FE application icon on each desktop, and the original FE on my K drive,

How would I do it?

Sorry for my ignorance in dos.


DaniBoy
 
Last edited:
Create the file in Notepad and save as .bat. It will auto run when selected either by typing the file name in DOS or by clicking it in Windows.

Autoeng
 
Delete the old front end before recopying the new one each cleint pc


insert the following into the batch file

del c:\location\FILENAME.MDB /Y

before you recopy the new front end across.

locaton will be the directory stored

FILENAME.MDB is the filename

/y is an auto yes answer to the...
Are you sure you want to delete file FILENAME.MDB Y/N ?
________
CT3
 
Last edited:

Users who are viewing this thread

Back
Top Bottom