Why this shellexecute() not work?

Post Reply
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Why this shellexecute() not work?

Post by ShumingWang »

Hi,
This not works,only shows a few top lines of the backup file d:\mysqldata.sql :
shellexecute(odlg:hwnd,,"mysqldump.exe","--opt --host 192.168.0.123 --port=3306 -u root -p -C mysqldata>d:\mysqldata.sql",,.t.)


While this works:

fp:=FCREATE("bak.bat")
FWRITE(fp,"@ECHO OFF")
FWRITE(fp,CRLF+"mysqldump.exe --opt --host 192.168.0.123 --port=3306 -u root -p -C mysqldata>d:\mysqldata.sql")
FCLOSE(fp)
WaitRun("bak.bat")
FERASE("bak.bat")

Regards!
Shuming Wang
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Why this shellexecute() not work?

Post by Enrico Maria Giordano »

Try

Code: Select all

shellexecute(odlg:hwnd,0,"mysqldump.exe","--opt --host 192.168.0.123 --port=3306 -u root -p -C mysqldata>d:\mysqldata.sql",0,1)
EMG
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post by ShumingWang »

EMG,
Still as before, not work.

Shuming Wang
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post by ShumingWang »

EMG,
How?
Thanks!
Shuming Wang
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

Code: Select all

shellexecute(odlg:hwnd,0,"mysqldump.exe","--opt --host 192.168.0.123 --port=3306 -u root -p -C mysqldata",0,1)
EMG
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post by ShumingWang »

EMG,
mysqldata>d:\mysqldata.sql
This means from mysqldatabase 'mysqldata' backup to local file d:\mysqldata.sql . can't be cuted to 'mysqldata '.

Shuming Wang
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Why this shellexecute() not work?

Post by Enrico Maria Giordano »

Then try

Code: Select all

shellexecute(odlg:hwnd,0,"mysqldump.exe",'"--opt --host 192.168.0.123 --port=3306 -u root -p -C mysqldata>d:\mysqldata.sql"',0,1)
EMG
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post by ShumingWang »

EMG,
Not work still. :(
Is because of the para too long ?
Shuming Wang
Post Reply