Why this shellexecute() not work?
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
Why this shellexecute() not work?
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
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
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Why this shellexecute() not work?
Try
EMG
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)
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Code: Select all
shellexecute(odlg:hwnd,0,"mysqldump.exe","--opt --host 192.168.0.123 --port=3306 -u root -p -C mysqldata",0,1)
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Why this shellexecute() not work?
Then try
EMG
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)
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact: