data area passed to system call too small

bobmac-

Registered User.
Local time
Today, 11:08
Joined
Apr 28, 2008
Messages
59
Hi,

I'm using the SHELL function to command execute a Python script but I get the following error whenever the total length of the Arguments is too big.

'data area passed to a system call is too small'

I've looked at the parameters for the function but there doesn't seem anything to suit. Any ideas?

Code:
  retVal = Shell("cmd.exe /K S:\MID_Owners_Database_Workspace\OutletOwner.py " & strGeneral & " " & strEnlFactor & " " & strLabels & " " & strOutletCount & " " & strFirstParcels & " " & strOwners & " " & strOutlets & " " & strParcels, 1)
 
In debug.print print out what you pass to the shell, feed that line it to the system on the cmd commandline (rather than from access) and see what happens.
 
Hi,

I tried to use the command line and it did begin executing Python. However, when I pasted the string it only displayed part of the string then printed a Python traceback. The traceback showed 'list index out of range'. This is what I would expect if the script is expecting more argumants. The command window then printed more of the original string and then it printed the message ' N is not recognised as an internal or external command'. The window then completed the string and repeated the last error.
Even if it worked this way I still need to be able to execute from within ACCESS
 

Users who are viewing this thread

Back
Top Bottom