Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Security / February 2006

Tip: Looking for answers? Try searching our database.

Command line switches exceeding Max Character Limit

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Access101 - 27 Feb 2006 23:22 GMT
"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
"\\insseafs0a\insall\Business Process Management\Impact Analysis\Impact
Analysis.mdb" /Wrkgrp "\\insseafs0a\insall\Business Process Management\Impact
Analysis\Impact.mdw" /user "UsrName" /pwd "Password"

Is there a way to get rid of the path reference to MsAccess.exe, so that I
can fit all the characters in the rest of the line:

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

In general, how does one go about handling the limitations here.
Douglas J. Steele - 28 Feb 2006 00:59 GMT
You must have the reference to msaccess.exe: the switches are switches for
the executable, and therefore the executable must be in the command line to
receive the switches.

You could try converting the paths to their short file name equivalents. For
instance, "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" would
probably be C:\Progra~1\Micros~1\Office10\MSACCESS.EXE

http://www.mvps.org/access/api/api0020.htm at "The Access Web" is code that
will help you determine the correct short file names.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
> "\\insseafs0a\insall\Business Process Management\Impact Analysis\Impact
[quoted text clipped - 8 lines]
>
> In general, how does one go about handling the limitations here.
david epsom dot com dot au - 28 Feb 2006 07:32 GMT
Yes, you can change the registration for .mdb files so
that Windows expects parameters 2, 3, 4, etc.

The system is not very flexible, and normally if you
specify extra parameters, windows will give you an error
message if they are not provided - so double clicking
on an mdb after changing the registration would always
give you an error message, which you can ignore.

Another solution is to change the extension on the
access file, so that you can create a new registration,
with more command line parameters as required.

And that still only helps you with the Access path -
the other paths are still long.

A better solution is to define an access profile,
so that the workgroup path does not have to be
included at all:

...msaccess.exe /profile myprofile /user "usr" ...

Like file associations, profiles definitions go
in the registry: look in the Access help for information
on using profiles.

And somewhere, there is a setting which adjusts
the maximum allowable length for command lines.

But traditionally, the normal solution to this problem
is to NOT USE LONG NETWORK PATHS. The path to Access
would not matter if you were using simple 8 character
folder names for your network folders.

You can (unless the feature is disabled) use the
short names for your long folder names, for example
progra~1 instead of "program files", (you can get
the short names by doing a directory listing from
the command prompt) but how much easier just to use
short hames for your network folders in the first
place!

(david)

> "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
> "\\insseafs0a\insall\Business Process Management\Impact Analysis\Impact
[quoted text clipped - 8 lines]
>
> In general, how does one go about handling the limitations here.
Access101 - 28 Feb 2006 23:16 GMT
Thanks to both of you, that was very helpful!

> Yes, you can change the registration for .mdb files so
> that Windows expects parameters 2, 3, 4, etc.
[quoted text clipped - 52 lines]
> >
> > In general, how does one go about handling the limitations here.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.