Re: executing a file

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Afraid I don't know enough about Perl to be able to help.

You could try posting in microsoft.public.access.externaldata: John Nurick
tends to hang around there, and is good with Perl.

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


"Linda" <Linda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D94B699F-3546-4986-AFA0-9BE33C9A9345@xxxxxxxxxxxxxxxx
That's exactly what I've been trying since your last response. As it
turns
out, I'm getting an error. I had gotten the perl script working
standalone
before I tried to call it from the database. The perl script searches
files
in a directory and determines which ones have been imported into the
database
and then imports any that have not. The error I'm now getting is "The
database has been placed in a state by an unknown user that prevents it
from
being opened or locked." Apparently I have some sharing issues between
Access and ODBC. Do you know anything about that?
Thank you so much for all your help. Your ideas have helped me move
forward.
--
Linda


"Douglas J. Steele" wrote:

That's what I would have used.

I take it it works correctly if you open a Command prompt and type that
same
information into it?

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


"Linda" <Linda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EE5B5728-5809-4923-B02B-711FC3155C28@xxxxxxxxxxxxxxxx
I am using
Call Shell(stAppName, 1)
--
Linda


"Douglas J. Steele" wrote:

How are you calling the Shell function? Are you passing a second
parameter
as the WindowStyle?

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


"Linda" <Linda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DE07A35B-6D58-47C2-B496-6296405E58D7@xxxxxxxxxxxxxxxx
My command looked like:
stAppName = "C:\Perl\bin\perl.exe C:\Documents and
Settings\myname\mydir\myfile.pl"
I had tried the double quotes but missed the triples which was
giving a
syntax error. My command now has quotes as per your example.
However,
the
results are the same. I see the DOS command window flash and
disappear.
The
perl script has not executed.
Any other ideas?
Thank you.

--
Linda


"Douglas J. Steele" wrote:

Exactly what are you passing as the argument to the Shell command?
While
you
may be able to simply type "file.pl" in a command prompt and have
it
run,
I
believe you need to pass "perl.exe file.pl" to Shell.

In fact, you may need the full path fo perl.exe (and, of course, to
the
perl
file being run). If there are spaces in the paths, you'll need
extra
quotes:

"""C:\Program Files\Perl\Perl.exe"" ""C:\Some Folder\file.pl"""

(That's three double quotes at the beginning and end of the string,
and a
couple of pairs of double quotes, with a space between the pairs,
in
the
middle)

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


"Linda" <Linda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B5BA1890-B517-4ED4-BEE9-E8C056C6631D@xxxxxxxxxxxxxxxx
Thanks, I tried the shell command attached to a click on a
button.
I
get
no
errors and I see a very quick flash of what appears to be a DOS
command
window but it is gone before any contents can be seen. The perl
file
called
doesn't execute. Any further suggestions?
--
Linda


"Daniel" wrote:

If it is a seperate file you could use the shell command.
--
Hope this helps,

Daniel P






"Linda" wrote:

I would like to execute a perl script from one of the
switchboard
selections.
Does anyone know how to do that?
Thanks.
--
Linda











.



Relevant Pages

  • Re: executing a file
    ... syntax error. ... My command now has quotes as per your example. ... In fact, you may need the full path fo perl.exe (and, of course, to the perl ...
    (microsoft.public.access.formscoding)
  • Command line fed to Perl was Re: File::Find again
    ... In Linux bash shell those quotes tell the shell to not ... It's a different case here ie not a var, instead it's a command line that's ... such command line being passed to Perl. ...
    (perl.beginners)
  • Re: installing LWP::UserAgent on windows
    ... > Iam simply testing out LWP, I tried using it to find the latest perl ... > it says this error for basically any command I use for lwp ... On Windows you need to enclose the code within double quotes, ...
    (comp.lang.perl.modules)
  • RE: Perl one liner....
    ... I think it was everything to do with double quotes on windows. ... Subject: Perl one liner.... ... |following command on windows. ... Last time I was forced to use Windows, it went goofy on single quotes. ...
    (perl.beginners)
  • Re: IPC::open3: What goes wrong?
    ... On the command line "ls -ly" has the return code 2, ... You have the wrong type of quotes in Perl. ... Oops, yes, You are right. ...
    (comp.lang.perl.misc)