FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Why this shellexecute() not work?
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Why this shellexecute() not work?
Posted: Fri Jul 27, 2007 10:22 AM

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

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Why this shellexecute() not work?
Posted: Fri Jul 27, 2007 11:02 AM
Try

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
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Why this shellexecute() not work?
Posted: Sat Jul 28, 2007 02:01 AM

EMG,
Still as before, not work.

Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Why this shellexecute() not work?
Posted: Sat Jul 28, 2007 08:40 AM

Try without the redirection.

EMG

Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Why this shellexecute() not work?
Posted: Sun Jul 29, 2007 07:26 AM

EMG,
How?
Thanks!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Why this shellexecute() not work?
Posted: Sun Jul 29, 2007 08:19 AM
shellexecute(odlg:hwnd,0,"mysqldump.exe","--opt --host 192.168.0.123 --port=3306 -u root -p -C mysqldata",0,1)


EMG
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Why this shellexecute() not work?
Posted: Mon Jul 30, 2007 01:21 AM

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

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Why this shellexecute() not work?
Posted: Mon Jul 30, 2007 07:24 AM
Then try

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
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Why this shellexecute() not work?
Posted: Mon Jul 30, 2007 10:00 AM

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

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Why this shellexecute() not work?
Posted: Mon Jul 30, 2007 10:16 AM

I don't know, sorry.

EMG

Continue the discussion