[AccessD] Max length Command Line Parms for Access2007

James Button jamesbutton at blueyonder.co.uk
Tue Mar 19 15:28:23 CDT 2013


Just tested a .bat file under 32 bit XP and it seems to be happy to find the
*.sys
 of a
dir *.sys
with over 2000 spaces between the dir and *
and it shows a PAUSE with a 150 character message

so that seems to rubbish the "127 limit in .bat" when running under
start run cmd
and when double-clicked from windows explorer.

Looks like we could be looking for an answer from someone who can actually 
test Access2007

JimB


----- Original Message ----- 
From: "jack drawbridge" <jackandpat.d at gmail.com>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Tuesday, March 19, 2013 7:47 PM
Subject: Re: [AccessD] Max length Command Line Parms for Access2007


> Thanks Jim. I did find a couple of those sites on my search as well - 
> 8191
> and then someone who found 2048.
> Thanks for responding.
>
> On Tue, Mar 19, 2013 at 3:41 PM, James Button
> <jamesbutton at blueyonder.co.uk>wrote:
>
>> Jack,
>>
>> AFAIK there would be no particular Access 2007 limit
>> (I have not got a copy to test)
>> However, there is a limit to the length of the 'line' that the OS will
>> handle
>>
>> A 'Bing' search with keys of
>> windows command line length limits
>> returns a variety of, at first looks, useful entries
>> MS KB 830473 WinXP and later - 8191 characters
>> MSDN 2003/12/10 56028 INTERNET_MAX_URL_LENGTH 2048
>> The use of Shell Extension handlers - see
>> see 
>> http://msdn.microsoft.com/en-**us/library/cc144165(VS.85).**aspx<http://msdn.microsoft.com/en-us/library/cc144165(VS.85).aspx>and
>> http://msdn.microsoft.com/en-**us/library/bb776797.aspx<http://msdn.microsoft.com/en-us/library/bb776797.aspx>
>> ).
>>
>> A workaround (that confuses me) at
>> http://www.mail-archive.com/**gwt-maven@googlegroups.com/**msg00301.html<http://www.mail-archive.com/gwt-maven@googlegroups.com/msg00301.html>
>>
>> And that there are other limits as in
>> Red Hat 9 GNU/Linux appears to have a limit of about 128K characters,
>> while Windows XP has a limit of 32K.
>>
>> Plus a .bat limit applied as:  Any batch file line exceeding 127 bytes is
>> truncated at 127 bytes before it is processed.
>>
>> AND - re .cmd lines
>> a.. In Command Prompt, the total length of the following command line 
>> that
>> you use at the command prompt cannot contain more than either 2047 or 
>> 8191
>> characters (as appropriate to your operating system):
>> cmd.exe /k ExecutableFile.exe parameter1, parameter2 ... parameterN
>> a.. In a batch file, the total length of the following command line that
>> you use in the batch file cannot contain more than either 2047 or 8191
>> characters (as appropriate to your operating system):
>> cmd.exe /k ExecutableFile.exe parameter1, parameter2 ... parameterN
>> This limitation applies to command lines that are contained in batch 
>> files
>> when you use Command Prompt to run the batch file.
>> a.. In Command Prompt, the total length of EnvironmentVariable1 after you
>> expand EnvironmentVariable2 and EnvironmentVariable3 cannot contain more
>> than either 2047 or 8191 characters (as appropriate to your operating
>> system):
>> c:> set EnvironmentVariable1=**EnvironmentVariable2Environmen**tVariable3
>> a.. In a batch file, the total length of the following command line after
>> you expand the environment variables in the command line cannot contain
>> more than either 2047 or 8191 characters (as appropriate to your 
>> operating
>> system):
>> ExecutableFile.exe parameter1parameter2
>> a.. Even though the Win32 limitation for environment variables is 32,767
>> characters, Command Prompt ignores any environment variables that are
>> inherited from the parent process and are longer than its own limitations
>> of either 2047 or 8191 characters (as appropriate to the operating 
>> system).
>> For more information about the SetEnvironmentVariable function, visit the
>> following Microsoft Web site:
>>
>>
>> So AFAIK - it's fun for all, and  a "depends on" answer
>>
>> JimB
>>
>> ----- Original Message ----- From: "jack drawbridge" <
>> jackandpat.d at gmail.com>
>> To: "Access Developers discussion and problem solving" <
>> accessd at databaseadvisors.com>
>> Sent: Tuesday, March 19, 2013 7:12 PM
>> Subject: [AccessD] Max length Command Line Parms for Access2007
>>
>>
>>  Someone is asking the max length of command line parameters that can be
>>> passed to Ms Access(2007).
>>> Since there hasn't been much activity on AccessD, thought I'd ask if
>>> anyone
>>> knew from experience or a link.
>>>
>>> Thanks in advance.
>>> jack
>>> --
>>> AccessD mailing list
>>> AccessD at databaseadvisors.com
>>> http://databaseadvisors.com/**mailman/listinfo/accessd<http://databaseadvisors.com/mailman/listinfo/accessd>
>>> Website: 
>>> http://www.databaseadvisors.**com<http://www.databaseadvisors.com>
>>>
>>
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/**mailman/listinfo/accessd<http://databaseadvisors.com/mailman/listinfo/accessd>
>> Website: 
>> http://www.databaseadvisors.**com<http://www.databaseadvisors.com>
>>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com 



More information about the AccessD mailing list