Command Line Execution

G

Guest

This command line works:

WshShell.Run("\"C:\\Program Files\\Microsoft
Office\\Office10\\msaccess.exe\" \"C:\\Program Files\\Pipeline
Database\\Pipeline2000.mde\"",10,1);

This doesn't:

WshShell.Run("\"C:\\Program Files\\Microsoft
Office\\Office10\\msaccess.exe\"
\"\\\\MYSERVER\\\\Pipeline\\\\Pipeline2000.mde\"",10,1);

I get a read only warning, any ideas?

Thanks!
 
W

Wayne Morgan

I believe there should be 2 back slashes before MyServer (4 to get you 2 in
what you're doing) and only one after MyServer.

A normal UNC path would be:

\\MyServer\Pipeline\Pipeline2000.mde

I believe what you have would result in:
\\MyServer\\Pipeline\\Pipeline2000.mde
 
D

Douglas J Steele

While Wayne may be correct in his suggestion, if you're actually opening the
database with your statement (in other words, it's being interpretted
correctly, or else you made an error in what you posted), check what your
permissions are on the folder where the mde file exists.

You need Change access to the folder. This is because the first user in
creates a locking file (.ldb) in the folder, subsequent users update that
locking file, and the last user out deletes it. (And just in case your next
question is "Can I put the locking file somewhere else?", the answer is "No,
you can't change this behaviour"!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top