Too long string in the db shorcut (1 Viewer)

Newman

Québécois
Local time
Today, 17:17
Joined
Aug 26, 2002
Messages
766
I want to make a short cut to a db that would look like this:
Code:
"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" "\\Intranet\Company\Province\City\District\Server\Shared\Department\Folder\Database.mdb" /wrkgrp "\\Intranet\Company\Province\City\District\Server\Shared\Department\Folder\Security.mdw"

If you add the real names for each folder, it gives me a realy long string. Too long for windows to handle.

What can I do?

I cannot change the directories, they are given to me like that and I have to live with it.

I thaught about leaving the shortcut in the same directory as the mdb and mdw files and change the shortcut for something like this:
Code:
"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" "CurrentDir\Database.mdb" /wrkgrp "CurrentDir\Security.mdw"

If it can be done, what is the code that I should use?

Thank you!
 

ghudson

Registered User.
Local time
Today, 17:17
Joined
Jun 8, 2002
Messages
6,195
The only option you have is to move the workgroup file to a higher lever in the directory chain which might save you enough character spaces to do what you want. I believe that you are limited to 255 characters.

Like this...

"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" "\\Intranet\Company\Province\City\District\Server\S hared\Department\Folder\Database.mdb" /wrkgrp "\\Intranet\Company\Province\Security.mdw"
 

ChrisO

Registered User.
Local time
Tomorrow, 07:17
Joined
Apr 30, 2003
Messages
3,202
I don’t know if this is a good idea or not but you may be able to create an environment variable of the path.

This was a simple test but it ran Password_A97.mdb using %XFolder% as the path.


"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" %XFolder%Password_A97.mdb

Where %XFolder% equated to: -

C:\Intranet\Company\Province\City\District\Server\Shared\Department\Folder\
(There’s no space before Shared I just can’t get rid of it.)

Environment variables seem to take very long strings so maybe that will work.

Hope that helps.

Regards,
Chris.
 

Newman

Québécois
Local time
Today, 17:17
Joined
Aug 26, 2002
Messages
766
I found out that a part of the address was optionnal.

"\\Server\Shared\Department\Folder\Database.mdb"

is the same as

"\\Intranet\Company\Province\City\District\Server\Shared\Department\Folder\Database.mdb"

Anyway, thank you both for your help.
 

Users who are viewing this thread

Top Bottom