Why this shellexecute() not work?

Why this shellexecute() not work?

Postby ShumingWang » 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
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Re: Why this shellexecute() not work?

Postby Enrico Maria Giordano » Fri Jul 27, 2007 11:02 am

Try

Code: Select all  Expand view
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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby ShumingWang » Sat Jul 28, 2007 2:01 am

EMG,
Still as before, not work.

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

Postby Enrico Maria Giordano » Sat Jul 28, 2007 8:40 am

Try without the redirection.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby ShumingWang » Sun Jul 29, 2007 7:26 am

EMG,
How?
Thanks!
Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Postby Enrico Maria Giordano » Sun Jul 29, 2007 8:19 am

Code: Select all  Expand view
shellexecute(odlg:hwnd,0,"mysqldump.exe","--opt --host 192.168.0.123 --port=3306 -u root -p -C mysqldata",0,1)


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby ShumingWang » Mon Jul 30, 2007 1: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
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Re: Why this shellexecute() not work?

Postby Enrico Maria Giordano » Mon Jul 30, 2007 7:24 am

Then try

Code: Select all  Expand view
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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby ShumingWang » Mon Jul 30, 2007 10:00 am

EMG,
Not work still. :(
Is because of the para too long ?
Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Postby Enrico Maria Giordano » Mon Jul 30, 2007 10:16 am

I don't know, sorry.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 50 guests