Configuring a client/server db

I'll give that a shot. But I'm kind of doubtful. Reason being it wasn't working when there wasn't already a copy in the folder.
 
That didn't work either. I'm sure it's helpful. I just think the NT guys have some security settings that are preventing me from running this.

Thanks anyway.
 
This was my first batch - it worked for me (I didn't include the security part - sorry I don't have a solution for you Rob!)

I was wondering, Autoeng, about other functionality I could add? (I know only basic Unix stuff - so far it works the same in DOS) For instance, when Access runs it is normal size - can I maximize the app? Also, did you just distribute the batch file as is? Can I change the icon of a batch file? Finally, DOS seems to stay open in the background - is there a command to close it? (it can close by clicking on it and it does close it automatically - just for aesthetics).

Thanks in advance,

-Sean
 
Last edited:
What bothers me about this exchange is that if this were REALLY a DOS window, you could never execute a command that followed a command waiting to complete. As far as I recall (and I don't think I've forgotten THAT much), all DOS commands execute synchronously. I.e. NO multi-tasking possible.

Look up your DOS / AT. help-file options to see if there is an IF statement that can test any type of error code indicator. If the COPY fails and returns an error code, you DON'T want to execute the next step. Which usually means an error trap.

The other issue is how your nework folks are stopping you from downloading a file. Normally, front-end files are relatively small compared to back-end files. So unless they aren't allowing downloads at all, which I find hard to believe, I would question how they are stopping you.

I'll give you some ammo for your talk with the network gurus. Tell them they can let you download your front-end once per session and then NEVER again download any forms, reports, queries, or code modules until the end of the session, even if lasts all day. OR you can just plotz the whole database (front-end, back-end, and workgroup file) on the server and let Access download everything on demand every time you open it.
 
YKY:

I'm going to turn you over to the following website for possible answers to things that you can do via the batch file. Jeremy has written some super batch files that do a lot of things. I don't believe however that you are going to find a way around the things you ask about but if there is a way Jeremy is the guy.

Good luck,
Autoeng

http://www.alphabetcitydataworks.com/Developers/Index.html
 
Hey all,

I looked in the help section and found some things that have gotten me further. I was able to get a batch file to copy a db and then open it if there wasn't any security on it. This is what I've got so far:

copy "J:\Tax\Outsourcing\Payment Calculator\Backups\db1.mdb" "C:\Documents and Settings\All Users\Documents\db1.mdb" /y
"C:\Documents and Settings\All Users\Documents\db1.mdb"

I added the /y at the end to allow it to overwrite the existing file. Now this works great. I tried to implement this idea with the db I started out with that had security and it's having problems with that. But I know I'm getting closer. Don't know why I'm having such a challenge.

Doc Man, thanks for your ammo to give the network guys.
 
No problem. I run into that one all of the time.

As to the security on the file, here is where your network guys are going to have to be your friends.

IF you are going to use anything from the shared drive, the directory in which you plotz everything will have to allow the following: (I'm using Novell terms for this because we have a Novell network site here)

You must be able to do

FILE SCAN (to look up file names)
READ (obvious for the database but...)
WRITE (obvious for the database but...)
MODIFY (obvious for the database but...)
CREATE (not so obvious)
ERASE (not so obvious)
The only Novell-equivalent rights you DON'T need are ACCESS CONTROL and SUPERVISOR.

The reason you need so many rights is because the first person in the database every day has to CREATE a .LDB file. (This is the lock data file.) The last person out of the database at the end of the day has to delete (ERASE) that same .LDB file. This is true EVEN FOR READ-ONLY USERS OF YOUR DATABASE! So your sharing strategy has to be that you have a relatively high-level directory. I.e. not too many steps in the path specificiation. Top-level directory would be top-notch. No deeper than second or third-level directory under any circumstances you can control.

Then give all the appropriate users the rights equivalent to the above rights for that directory and all files in it, including any subdirectories that might exist. Your users will need READ rights on parent directories of the one in which the files exist.

NEVER share this directory with any other project. Resign yourself to working closely with your network admin team regarding new users who should be granted rights to the given directory. By keeping ALL of the files in that one directory, you allow for better security. You also make the network guys happy because it is far easier to control a single directory and allow for inheritance of rights to child directories.
 
Ok. So, the reason this batch file will not work on this db is because it's too deep and people don't have all these privileges to this directory. That makes sense. Thanks for your help. At least now I know my challenges have not been due to something minor I've been missing.
 
Just wanted to say thanks to Autoeng - that link answered my question and then some! A great start for newbie batch writers! - like me :)

-Sean
 
I was in situation where we tried the Windows Scripting Host. That seemed to work. But we set it up to compare a client file date with the date of a copy of the same file on the server. If the date on the server was later than the date on the client, the mde was copied down to client; otherwise it wasn't. The file was just a one line text file that had to be recreated when ever we put a new version on the server.

Once the new mde was copied down, the script opened it. We used the WSH because it was not possible to do this with a batch file. But I don't have a copy of the script and I didn't write it. Also I'm finding it difficult to get any good written material about how to use the WSH. If anyone knows where I can get it,please let me know. I would like write a script that does the same thing.
 

Users who are viewing this thread

Back
Top Bottom