Jump to content

Recommended Posts

Posted

Hi i need help with running a command using autoit.

Below you see the script i use only wich gives me an error.

RunWait(@ComSpec & " /c " & 'c:\bfretail\mysql\bin\mysql.exe -u"root" -p"*******" -h"localhost" -e"select MD_NM_MODULE from module where MD_AANGESCHAFT = 'J';" -Dbnfdta > C:\Temp\module.txt', "", @SW_HIDE)

The error is found in this part of the script: MD_AANGESCHAFT = 'J';"
The the dos command uses a ' around the letter J when i use autoit this gives an error when run script.

 

Hope you guys can help me.

Posted (edited)

Hi.

To track down "quotation" issues, it's always a good idea, to separately "build" the Command Line, then to use "run()"

$cmd=@ComSpec & ' /c "' & 'c:\bfretail\mysql\bin\mysql.exe -u"root" -p"*******" -h"localhost" -e"select MD_NM_MODULE from module where MD_AANGESCHAFT = ''J'';" -Dbnfdta > C:\Temp\module.txt'
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $cmd = ' & $cmd & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console

 

regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...